powered by Jive Software

Broken roomDestroyed() callback

Since we(Jitsi) upgraded to Smack 4.4 we got multiple reports from the community that destroying a room is broken and one of our serverside components does not detect it.
We tracked it down to https://github.com/igniterealtime/Smack/commit/0f7b7df1f0cd6a3d2f75a983143d02fda8990111

Even though the XEP does not mention anything about the status in the x element for the destroy presence, we think that handling of the presence unavailable should be tolerant process those messages if there is a status or not.
The incoming message is:

<presence xmlns='jabber:client' xml:lang='en' to='focus@auth.mydomain.com/focus' from='damencho@conference.mydomain.com/focus' type='unavailable'>
    <x xmlns='http://jabber.org/protocol/muc#user'>
        <item affiliation='owner' jid='focus@auth.mydomain.com/focus' role='none'></item>
        <status code='110'/>
        <destroy></destroy>
    </x>
</presence>

and Smack ignores it, which was not the case running with Smack 4.2.

Here is a fix: https://github.com/igniterealtime/Smack/pull/495
Does it look ok? Should I create one and for the 4.4 branch?

I haven’t testes or run anything when creating a PR as I cannot build the project due to other old issues.

Thanks. It think moving if (destroy != null) { a little bit further down should be ok (but I had not time to think carefully about this).

Yes, this potential change is a good candidate for the 4.4 branch. You don’t need to create a new PR targeting the 4.4 branch, you can switch the target branch in the PR itself. You may have to cherry pick the commit on top of the 4.4 branch and use the resulting commit as HEAD for your fix-destroy branch.

Does this work https://github.com/igniterealtime/Smack/pull/496

Looks good, I have created SMACK-915.