Software /
code /
prosody-modules
Comparison
mod_mam_muc/mod_mam_muc.lua @ 2722:e32bf5e19acd
mod_mam_muc: Only collect original JID for messages (unavailable presence seems to cause an error)
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Fri, 23 Jun 2017 15:31:55 +0200 |
parent | 2721:391c508e0b75 |
child | 2723:ec02ee02a04b |
comparison
equal
deleted
inserted
replaced
2721:391c508e0b75 | 2722:e32bf5e19acd |
---|---|
393 return tag; | 393 return tag; |
394 end); | 394 end); |
395 | 395 |
396 local stored_stanza = stanza; | 396 local stored_stanza = stanza; |
397 | 397 |
398 if self:get_whois() == "anyone" then | 398 if stanza.name == "message" and self:get_whois() == "anyone" then |
399 stored_stanza = st.clone(stanza); | 399 stored_stanza = st.clone(stanza); |
400 local actor = jid_bare(self._occupants[stanza.attr.from].jid); | 400 local actor = jid_bare(self._occupants[stanza.attr.from].jid); |
401 local affiliation = self:get_affiliation(actor) or "none"; | 401 local affiliation = self:get_affiliation(actor) or "none"; |
402 local role = self:get_role(actor) or self:get_default_role(affiliation); | 402 local role = self:get_role(actor) or self:get_default_role(affiliation); |
403 stored_stanza:add_direct_child(st.stanza("x", { xmlns = xmlns_muc_user }) | 403 stored_stanza:add_direct_child(st.stanza("x", { xmlns = xmlns_muc_user }) |