Comparison

plugins/muc/muc.lib.lua @ 5397:ed55a48270be

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)
author Matthew Wild <mwild1@gmail.com>
date Thu, 28 Mar 2013 09:50:21 -0400
parent 5335:bb81c13d2c6f
child 5519:06e188268df1
comparison
equal deleted inserted replaced
5395:ec33d72a08b6 5397:ed55a48270be
890 else 890 else
891 stanza.attr.from = from; 891 stanza.attr.from = from;
892 origin.send(st.error_reply(stanza, "auth", "forbidden")); 892 origin.send(st.error_reply(stanza, "auth", "forbidden"));
893 end 893 end
894 else 894 else
895 self:broadcast_message(stanza, self:get_historylength() > 0); 895 self:broadcast_message(stanza, self:get_historylength() > 0 and stanza:get_child("body"));
896 end 896 end
897 stanza.attr.from = from; 897 stanza.attr.from = from;
898 end 898 end
899 elseif stanza.name == "message" and type == "error" and is_kickable_error(stanza) then 899 elseif stanza.name == "message" and type == "error" and is_kickable_error(stanza) then
900 local current_nick = self._jid_nick[stanza.attr.from]; 900 local current_nick = self._jid_nick[stanza.attr.from];