Changeset

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
parents 2721:391c508e0b75
children 2723:ec02ee02a04b
files mod_mam_muc/mod_mam_muc.lua
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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";