mod_muc/muc.lib: Don't add messages without a body (such as chat state notifications...
authorMatthew Wild <mwild1@gmail.com>
Thu, 28 Mar 2013 13:50:21 +0000 (09:50 -0400)
committerMatthew Wild <mwild1@gmail.com>
Thu, 28 Mar 2013 13:50:21 +0000 (09:50 -0400)
plugins/muc/muc.lib.lua

index 91b4792d9d30fb72539ea69fc1a4272debd0b5f1..b6167a19d4ea3403cbe8f2f8f1be26984f27fee9 100644 (file)
@@ -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