diff --git a/mod_mix_pam/mod_mix_pam.lua b/mod_mix_pam/mod_mix_pam.lua index 8d78ea8..f333e0f 100644 --- a/mod_mix_pam/mod_mix_pam.lua +++ b/mod_mix_pam/mod_mix_pam.lua @@ -173,7 +173,7 @@ function handle_client_join(event) local join_iq = st.iq({ type = "set", from = jid.bare(stanza.attr.from), to = client_join.attr.channel, id = stanza.attr.id, xmlns = "jabber:client" }); join_iq:add_child(join); - add_state(stanza.attr.id, origin); + add_state(stanza.attr.id, jid.resource(from)); module:send(join_iq); return true; @@ -200,7 +200,7 @@ function handle_client_leave(event) local leave_iq = st.iq({ type = "set", from = jid.bare(stanza.attr.from), to = client_leave.attr.channel, id = stanza.attr.id }); leave_iq:add_child(leave); - add_state(stanza.attr.id, origin); + add_state(stanza.attr.id, jid.resource(from)); module:send(leave_iq); return true;