From: Matthew Wild Date: Thu, 28 Mar 2013 13:50:21 +0000 (-0400) Subject: mod_muc/muc.lib: Don't add messages without a body (such as chat state notifications... X-Git-Url: https://git.enpas.org/?a=commitdiff_plain;h=3648d4a65a4ebd7caeb17cb18b42fda7687081f6;p=prosody.git 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) --- 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