powered by Jive Software

Openfire doesn't remove roster items if subscriptions been rejected

In Openfire 3.7.x, if a subscription request has been rejected a the contact, the Openfire server doesn’t remove the roster item records from the ofRoster table. This results in many useless (sub == none, ask == none and recv == none) records in the DB, which is really annoying.

According to the XMPP Presence specification 8.2.1 Contact Declines Subscription Request (http://xmpp.org/rfcs/rfc3921.html), the user’s roster items for tracking purposes should be removed when the subscription request has been rejected.

So I wonder if you guys forgot to add the code to remove the (sub == none, ask == none and recv == none) records when the subscption records have been rejected.

I think Openfire’s behavior here is correct.

See here:


(the updated rfc. 3921 is obsolete)

Nothing about removing records from the roster, although from a user’s perspective it doesn’t make sense to keep those denied entries.

Actually this issue is confusing and misleading.

http://xmpp.org/rfcs/rfc3921.html#int states the following (8.2.1):

“If the contact’s server previously added the user to the contact’s roster for tracking purposes, it MUST remove the relevant item at this time.”

While the updated spec http://xmpp.org/rfcs/rfc6121.html#sub-cancel-outbound doesn’t included such a sentence.

What is right?

Openfire 3.7.0 does not remove it.

ya, OpenFire don’t delete that rosters, but u can do it urself, just check - if user don’t apply u friendship - set iq, like this:

var iq = $iq({type: "set"}).c("query", {xmlns: "jabber:iq:roster"}).c("item", {jid: data.jid, subscription: "remove"});

(in JavaScript)

this help u remove unsubscribed roster from both lists =)*