From 94d4efbee4125616a34be53259dbf8298f39a70a Mon Sep 17 00:00:00 2001 From: Matthew Wild Date: Thu, 28 Mar 2013 09:50:21 -0400 Subject: mod_muc/muc.lib: Don't add messages without a body (such as chat state notifications) to the room history (thanks louiz?, Link Mauve, poezio and all its users) --- plugins/muc/muc.lib.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'plugins/muc/muc.lib.lua') diff --git a/plugins/muc/muc.lib.lua b/plugins/muc/muc.lib.lua index 91b4792d..b6167a19 100644 --- a/plugins/muc/muc.lib.lua +++ b/plugins/muc/muc.lib.lua @@ -892,7 +892,7 @@ function room_mt:handle_to_room(origin, stanza) -- presence changes and groupcha origin.send(st.error_reply(stanza, "auth", "forbidden")); end else - self:broadcast_message(stanza, self:get_historylength() > 0); + self:broadcast_message(stanza, self:get_historylength() > 0 and stanza:get_child("body")); end stanza.attr.from = from; end -- cgit v1.2.3