diff options
author | Matthew Wild <mwild1@gmail.com> | 2013-03-28 09:50:21 -0400 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2013-03-28 09:50:21 -0400 |
commit | 3e82157cccea14b070ae25d3e38aa0f2064d4fdb (patch) | |
tree | 6e89afeabc71219c5c683df946478f89ff6dcd37 /plugins/muc | |
parent | ff73782f9b19dd60f0e2b7bb13eb4a2959a29732 (diff) | |
download | prosody-3e82157cccea14b070ae25d3e38aa0f2064d4fdb.tar.gz prosody-3e82157cccea14b070ae25d3e38aa0f2064d4fdb.zip |
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)
Diffstat (limited to 'plugins/muc')
-rw-r--r-- | plugins/muc/muc.lib.lua | 2 |
1 files changed, 1 insertions, 1 deletions
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 |