#765 mod_muc does not set 110 status code on unavailable presences sent to kicked occupants
Reporter
Jonas Wielicki
Owner
Zash
Created
Updated
Stars
★ (1)
Tags
Compliance
Status-Fixed
Milestone-0.10
Type-Defect
Priority-Medium
Jonas Wielicki
on
Example 90 from XEP-0045 (Section 8.2, Kicking an Occupant):
<presence
from='harfleur@chat.shakespeare.lit/pistol'
to='pistol@shakespeare.lit/harfleur'
type='unavailable'>
<x xmlns='http://jabber.org/protocol/muc#user'>
<item affiliation='none' role='none'>
<actor nick='Fluellen'/>
<reason>Avaunt, you cullion!</reason>
</item>
<status code='110'/>
<status code='307'/>
</x>
</presence>
In my tests, however, prosody does not emit the 110 status code. firstwitch kicks secondwitch (I know, this is non-canon; whitespace is for readability):
<iq to="coven@muc.localhost" id="xcjTCYuhaASDXP+vdlCNz" type="set">
<query xmlns="http://jabber.org/protocol/muc#admin">
<item role="none" nick="secondwitch">
<reason>Thou art no real witch</reason>
</item>
</query>
</iq>
Then secondwitch receives:
<presence id="xhPF8JZx/TtGS+DkWrTaf" type="unavailable" to="12e2487d-b157-4f91-ae10-dc3e9ea37b49@localhost/b199fb12-3941-4d93-9e4b-f4f4de8610b8" from="coven@muc.localhost/secondwitch">
<x xmlns="http://jabber.org/protocol/muc#user">
<item affiliation="none" role="none" nick="secondwitch">
<reason>Thou art no real witch</reason>
</item>
<status code="307"/>
</x>
</presence>
The 110 status code is missing from the presence sent by mod_muc, in contrast to the example from the XEP.
Example 90 from XEP-0045 (Section 8.2, Kicking an Occupant): <presence from='harfleur@chat.shakespeare.lit/pistol' to='pistol@shakespeare.lit/harfleur' type='unavailable'> <x xmlns='http://jabber.org/protocol/muc#user'> <item affiliation='none' role='none'> <actor nick='Fluellen'/> <reason>Avaunt, you cullion!</reason> </item> <status code='110'/> <status code='307'/> </x> </presence> In my tests, however, prosody does not emit the 110 status code. firstwitch kicks secondwitch (I know, this is non-canon; whitespace is for readability): <iq to="coven@muc.localhost" id="xcjTCYuhaASDXP+vdlCNz" type="set"> <query xmlns="http://jabber.org/protocol/muc#admin"> <item role="none" nick="secondwitch"> <reason>Thou art no real witch</reason> </item> </query> </iq> Then secondwitch receives: <presence id="xhPF8JZx/TtGS+DkWrTaf" type="unavailable" to="12e2487d-b157-4f91-ae10-dc3e9ea37b49@localhost/b199fb12-3941-4d93-9e4b-f4f4de8610b8" from="coven@muc.localhost/secondwitch"> <x xmlns="http://jabber.org/protocol/muc#user"> <item affiliation="none" role="none" nick="secondwitch"> <reason>Thou art no real witch</reason> </item> <status code="307"/> </x> </presence> The 110 status code is missing from the presence sent by mod_muc, in contrast to the example from the XEP.
Can you test with current trunk? It's got a major MUC rewrite and it looks like it should include that 110 code: https://hg.prosody.im/trunk/file/tip/plugins/muc/muc.lib.lua#l274
ChangesWorks in trunk, thanks! Any chance to get a fix backported to 0.10?
It would not be a backport since the code is completely different in trunk, but I've got a patch now.
ChangesFixed in https://hg.prosody.im/0.10/rev/260886554512 Similar fix for affiliation changes https://hg.prosody.im/0.10/rev/b187da5b7e8f
ChangesWorks for me, thanks!