plugins/muc/muc.lib: Allow plugins to reject broadcasts in the muc-broadcast-message event.
--- a/plugins/muc/muc.lib.lua Tue Sep 16 12:27:05 2014 -0400
+++ b/plugins/muc/muc.lib.lua Tue Sep 16 13:02:21 2014 -0400
@@ -164,8 +164,11 @@
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.