Software /
code /
prosody
Comparison
plugins/muc/muc.lib.lua @ 6128:8a71a1c34202
plugins/muc/muc.lib: Use occupant jids when whois == "moderators"
author | daurnimator <quae@daurnimator.com> |
---|---|
date | Wed, 19 Mar 2014 17:50:49 -0400 |
parent | 6127:a66ebc5d0ab5 |
child | 6129:6c66571ab0f9 |
comparison
equal
deleted
inserted
replaced
6127:a66ebc5d0ab5 | 6128:8a71a1c34202 |
---|---|
990 origin.send(st.error_reply(stanza, "auth", "forbidden")); | 990 origin.send(st.error_reply(stanza, "auth", "forbidden")); |
991 return true; | 991 return true; |
992 end | 992 end |
993 local _invitee = jid_prep(payload.attr.to); | 993 local _invitee = jid_prep(payload.attr.to); |
994 if _invitee then | 994 if _invitee then |
995 if self:get_whois() == "moderators" then | |
996 _from = current_nick; | |
997 end | |
995 local _reason = payload:get_child_text("reason") | 998 local _reason = payload:get_child_text("reason") |
996 local invite = st.message({from = _to, to = _invitee, id = stanza.attr.id}) | 999 local invite = st.message({from = _to, to = _invitee, id = stanza.attr.id}) |
997 :tag('x', {xmlns='http://jabber.org/protocol/muc#user'}) | 1000 :tag('x', {xmlns='http://jabber.org/protocol/muc#user'}) |
998 :tag('invite', {from=_from}) | 1001 :tag('invite', {from=_from}) |
999 :tag('reason'):text(_reason or ""):up() | 1002 :tag('reason'):text(_reason or ""):up() |