2

I have to remove a user issue with open fire xmpp .

  1. I Added user_1 in DeviceA it is sending Request to user_2 DeviceB,getting added.

  2. When i am removing user_2 from DeviceA, it should remove user_1 in DeviceB but user_1 not removing from DeviceB roster

  3. I am not receiving IQ packet subscription="remove"

    I have received IQ packet like subscription="to" and subscription="none"

    How to resolve this Issue?

The above scenario is working as expected in the openfire 3.6 but having problem with 4.1.

Amanpreet
  • 1,301
  • 3
  • 12
  • 29
Nagendar
  • 131
  • 9

2 Answers2

0

I think Openfire 4.1 is behaving correctly according to this defect seen on Openfire 3.6.4 but fixed as of 3.9.2. According to RFC-3921 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.

To implement what you want, you can explicitly send a remove IQ as discussed here:

And you can refer to the best practice here:

Community
  • 1
  • 1
volatilevar
  • 1,626
  • 14
  • 16
  • chat history message are not getting in "fetchChatHistoryWithJID"method `` – Nagendar Jan 02 '17 at 10:32
  • @Nagendar Could you please capture the stanza sent by the "fetchChatHistoryWithJID" method? – volatilevar Jan 02 '17 at 14:40
  • `NSXMLElement *iq = [NSXMLElement elementWithName:@"iq"]; NSXMLElement *list = [NSXMLElement elementWithName:@"list"]; NSXMLElement *set = [NSXMLElement elementWithName:@"set"]; NSXMLElement *max = [NSXMLElement elementWithName:@"max"]; NSXMLElement *before = [NSXMLElement elementWithName:@"before"]; [set addAttributeWithName:@"xmlns" stringValue:@"http://jabber.org/protocol/rsm"]; [list addAttributeWithName:@"xmlns" stringValue:@"urn:xmpp:archive"]; [list addAttributeWithName:@"with" stringValue:JID];` – Nagendar Jan 02 '17 at 14:54
  • @Nagendar Could you please paste the final XML text generated by the above code? That will be much easier. – volatilevar Jan 02 '17 at 14:57
  • i tried with this link but still having that issue http://stackoverflow.com/questions/20853071/feature-not-implemented-while-retrieving-archive-message – Nagendar Jan 02 '17 at 15:04
  • Yeah, the request looks fairly legit. I am not very experienced in message archiving, but I feel you do not have the message archiving support on the server side. Do you have the OpenArchive plugin installed? (As described here: http://stackoverflow.com/questions/19454587/retrieving-archive-messages-using-openfire-monitoring-plugin) – volatilevar Jan 02 '17 at 15:10
  • @Nagendar Since this discussion is now off-topic, you might want to create another question. – volatilevar Jan 02 '17 at 15:13
  • thank you buddy ,we are installed monitor plug-in but its not worked as expected . I will forward this link to server side. – Nagendar Jan 02 '17 at 15:20
0

think Openfire 4.1 is behaving correctly according to this defect seen on Openfire 3.6.4 but fixed as of 3.9.2. According to RFC-3921 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. To implement what you want, you can explicitly send a remove IQ as discussed here:

Delete a Friend from Roster in Xmpp/Openfire And you can refer to the best practice here:

https://xmpp.org/extensions/xep-0162.html#removal