diff options
author | Kim Alvefur <zash@zash.se> | 2017-12-22 01:02:05 +0100 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2017-12-22 01:02:05 +0100 |
commit | ceb2a46cf3b16fea2b8c6161f975e56c4ded69d6 (patch) | |
tree | ed5804b849fbe1b94e32827eec5cf5b2c0c79eda /plugins/muc | |
parent | f7e7fb38d87366c65c43e87982928cb7b44d6b37 (diff) | |
parent | 0611c96a56d6121f1c0fac377d3e3fa6f76f49b8 (diff) | |
download | prosody-ceb2a46cf3b16fea2b8c6161f975e56c4ded69d6.tar.gz prosody-ceb2a46cf3b16fea2b8c6161f975e56c4ded69d6.zip |
Merge 0.10->trunk
Diffstat (limited to 'plugins/muc')
-rw-r--r-- | plugins/muc/muc.lib.lua | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/plugins/muc/muc.lib.lua b/plugins/muc/muc.lib.lua index 8592e225..7de8ea24 100644 --- a/plugins/muc/muc.lib.lua +++ b/plugins/muc/muc.lib.lua @@ -164,6 +164,23 @@ function room_mt:build_item_list(occupant, x, is_anonymous, nick, actor_nick, ac end function room_mt:broadcast_message(stanza) + local to = stanza.attr.to; + local room_jid = self.jid; + + stanza:maptags(function (child) + if child.name == "delay" and child.attr["xmlns"] == "urn:xmpp:delay" then + if child.attr["from"] == room_jid then + return nil; + end + end + if child.name == "x" and child.attr["xmlns"] == "jabber:x:delay" then + if child.attr["from"] == room_jid then + return nil; + end + end + return child; + end) + if module:fire_event("muc-broadcast-message", {room = self, stanza = stanza}) then return true; end |