Software /
code /
prosody
Diff
plugins/muc/muc.lib.lua @ 8480:3d3706147174
Merge 0.10->trunk
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Fri, 22 Dec 2017 01:02:05 +0100 |
parent | 8467:7269313c1324 |
parent | 8477:597c23e1c38e |
child | 8481:d546815e555e |
line wrap: on
line diff
--- a/plugins/muc/muc.lib.lua Thu Dec 21 12:22:46 2017 -0500 +++ b/plugins/muc/muc.lib.lua Fri Dec 22 01:02:05 2017 +0100 @@ -164,6 +164,23 @@ 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