Fixed
Details
Details
Assignee
Guus der Kinderen
Guus der KinderenReporter
Daryl Herzmann
Daryl HerzmannFix versions
Affects versions
Priority
Created June 22, 2009 at 6:17 PM
Updated October 28, 2020 at 1:26 PM
Resolved February 14, 2014 at 5:42 PM
Could I please ask someone to check that Openfire has correctly implemented this code.
In IQRosterHandler.java removeItem (I have inserted a copy below).
The code first correctly removes the contact you have requested to remove.
Then the code immediately removes you from the other contacts roster? This seems to be in violation of the standard.
RFC-3921 - http://tools.ietf.org/html/rfc3921 Section 8.6
"When the user removes the contact from the user's roster, the
end state of the contact's roster is that the user is still in the
contact's roster with a subscription state of "none"; in order to
completely remove the roster item for the user, the contact needs to
also send a roster removal request."
I am not an expert so could have misinterpreted this, so I apologise if I am wrong.
We are experiencing a lot of issues due to this particular problem and the only work around is to try and re-add the user into the Roster.
private void removeItem(org.jivesoftware.openfire.roster.Roster roster, JID sender, org.xmpp.packet.Roster.Item item) throws SharedGroupException { JID recipient = item.getJID(); // Remove recipient from the sender's roster roster.deleteRosterItem(item.getJID(), true); // Forward set packet to the subscriber if (localServer.isLocal(recipient)) { // Recipient is local so let's handle it here try { Roster recipientRoster = userManager.getUser(recipient.getNode()).getRoster(); recipientRoster.deleteRosterItem(sender, true); } catch (UserNotFoundException e) { // Do nothing } } else { // Recipient is remote so we just forward the packet to them String serverDomain = localServer.getServerInfo().getXMPPDomain(); // Check if the recipient may be hosted by this server if (!recipient.getDomain().contains(serverDomain)) { // TODO Implete when s2s is implemented } else { Packet removePacket = createRemoveForward(sender, recipient); router.route(removePacket); } } }