[XEP-0296] Chat resource not getting unlocked on a new presence

Hey there,

As seen in https://xmpp.org/extensions/xep-0296.html:

any <presence/> update from any resource for the conversee’s bare JID, including <presence type=‘unavailable’/>. The client SHOULD revert to the initial state, sending any following correspondence to the conversee’s bare JID.

But looking at the code in https://github.com/igniterealtime/Smack/blob/5782fff2a48f4f58acd8e2c81ea9921ffe31351f/smack-extensions/src/main/java/org/jivesoftware/smack/chat2/ChatManager.java#L164:

final EntityFullJid fullFrom = from.asEntityFullJidIfPossible();
 if (!chat.lockedResource.equals(fullFrom)) {
      return;
 }

In my scenario, the user relogins, which givens them a different full Jid. After the presence is sent, the receiving peer doesn’t unlock the current Chat resource because the jids are no longer the same.

Am I doing something wrong?

Thanks,
Pedro

No you are right, that ! needs to go. Would you mind creating a pull request against the 4.4 branch?

Fixed with

This topic was automatically closed 62 days after the last reply. New replies are no longer allowed.