Software /
code /
prosody
Comparison
plugins/mod_roster.lua @ 12100:0b14b541fd27
mod_roster: pass correct username to roster-item-removed
The other invocations use it that way, and the only listener in trunk
which uses it (in mod_presence) expects it that way.
Passing the username of the JID from the removed entry causes incorrect
unavailable presence stanzas to be sent, allegedly kicking people off
MUCs.
Fixes #1121.
author | Jonas Schäfer <jonas@wielicki.name> |
---|---|
date | Wed, 22 Dec 2021 13:06:32 +0100 |
parent | 8646:a267dfa9d81d |
child | 12101:7cd94469d15f |
comparison
equal
deleted
inserted
replaced
12099:b344edad61d3 | 12100:0b14b541fd27 |
---|---|
72 if item.attr.subscription == "remove" then | 72 if item.attr.subscription == "remove" then |
73 local roster = session.roster; | 73 local roster = session.roster; |
74 local r_item = roster[jid]; | 74 local r_item = roster[jid]; |
75 if r_item then | 75 if r_item then |
76 module:fire_event("roster-item-removed", { | 76 module:fire_event("roster-item-removed", { |
77 username = node, jid = jid, item = r_item, origin = session, roster = roster, | 77 username = from_node, jid = jid, item = r_item, origin = session, roster = roster, |
78 }); | 78 }); |
79 local success, err_type, err_cond, err_msg = rm_remove_from_roster(session, jid); | 79 local success, err_type, err_cond, err_msg = rm_remove_from_roster(session, jid); |
80 if success then | 80 if success then |
81 session.send(st.reply(stanza)); | 81 session.send(st.reply(stanza)); |
82 rm_roster_push(from_node, from_host, jid); | 82 rm_roster_push(from_node, from_host, jid); |