mod_mam_muc: Only collect original JID for messages (unavailable presence seems to cause an error)

Fri, 23 Jun 2017 15:31:55 +0200

author
Kim Alvefur <zash@zash.se>
date
Fri, 23 Jun 2017 15:31:55 +0200
changeset 2722
e32bf5e19acd
parent 2721
391c508e0b75
child 2723
ec02ee02a04b

mod_mam_muc: Only collect original JID for messages (unavailable presence seems to cause an error)

mod_mam_muc/mod_mam_muc.lua file | annotate | diff | comparison | revisions
--- a/mod_mam_muc/mod_mam_muc.lua	Fri Jun 23 14:19:55 2017 +0200
+++ b/mod_mam_muc/mod_mam_muc.lua	Fri Jun 23 15:31:55 2017 +0200
@@ -395,7 +395,7 @@
 
 	local stored_stanza = stanza;
 
-	if self:get_whois() == "anyone" then
+	if stanza.name == "message" and self:get_whois() == "anyone" then
 		stored_stanza = st.clone(stanza);
 		local actor = jid_bare(self._occupants[stanza.attr.from].jid);
 		local affiliation = self:get_affiliation(actor) or "none";

mercurial