25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-12-22 17:28:25 +01:00

Fix mucsub unsubscribe notification payload to have muc_unsubcribe in it

...instead of muc_subscribe
This commit is contained in:
Paweł Chmielowski 2022-08-24 10:30:02 +02:00
parent bce429dc44
commit a9e85674b8

View File

@ -4552,14 +4552,14 @@ process_iq_mucsub(From, #iq{type = set, sub_els = [#muc_unsubscribe{}]},
node = ?NS_MUCSUB_NODES_SUBSCRIBERS,
items = [#ps_item{
id = p1_rand:get_string(),
sub_els = [#muc_subscribe{jid = BareJID, nick = Nick}]}]}}]},
sub_els = [#muc_unsubscribe{jid = BareJID, nick = Nick}]}]}}]},
Packet1b = #message{
sub_els = [#ps_event{
items = #ps_items{
node = ?NS_MUCSUB_NODES_SUBSCRIBERS,
items = [#ps_item{
id = p1_rand:get_string(),
sub_els = [#muc_subscribe{nick = Nick}]}]}}]},
sub_els = [#muc_unsubscribe{nick = Nick}]}]}}]},
{Packet2a, Packet2b} = ejabberd_hooks:run_fold(muc_unsubscribed, ServerHost, {Packet1a, Packet1b},
[ServerHost, Room, Host, BareJID, StateData]),
send_subscriptions_change_notifications(Packet2a, Packet2b, StateData),