aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordaurnimator <quae@daurnimator.com>2014-09-16 13:02:21 -0400
committerdaurnimator <quae@daurnimator.com>2014-09-16 13:02:21 -0400
commit57b543c70405092fc24f859c05c734fc8b361030 (patch)
treea99f61374225d4bb76a084fdc3c101cb9889479d
parentf56e83c75b1e81373d9ec44113c2105f6e1b1839 (diff)
downloadprosody-57b543c70405092fc24f859c05c734fc8b361030.tar.gz
prosody-57b543c70405092fc24f859c05c734fc8b361030.zip
plugins/muc/muc.lib: Allow plugins to reject broadcasts in the muc-broadcast-message event.
-rw-r--r--plugins/muc/muc.lib.lua5
1 files changed, 4 insertions, 1 deletions
diff --git a/plugins/muc/muc.lib.lua b/plugins/muc/muc.lib.lua
index 3dd21303..6bcb28b1 100644
--- a/plugins/muc/muc.lib.lua
+++ b/plugins/muc/muc.lib.lua
@@ -164,8 +164,11 @@ function room_mt:build_item_list(occupant, x, is_anonymous, nick, actor, reason)
end
function room_mt:broadcast_message(stanza)
- module:fire_event("muc-broadcast-message", {room = self, stanza = stanza});
+ if module:fire_event("muc-broadcast-message", {room = self, stanza = stanza}) then
+ return true;
+ end
self:broadcast(stanza);
+ return true;
end
-- Broadcast a stanza to all occupants in the room.