Skip to content

Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.

feat(allowners): Adds a field to metadata which can be checked later by clients.

damenchodd8f2f53f325
diff --git a/resources/prosody-plugins/mod_muc_allowners.lua b/resources/prosody-plugins/mod_muc_allowners.lua
index b97fccf7e0..dbb4572ac5 100644
--- a/resources/prosody-plugins/mod_muc_allowners.lua
+++ b/resources/prosody-plugins/mod_muc_allowners.lua
@@ -1,3 +1,4 @@
+--- activate under the main muc component
local filters = require 'util.filters';
local jid = require "util.jid";
local jid_bare = require "util.jid".bare;
@@ -24,6 +25,14 @@ load_config();
-- have length of 1
local joining_moderator_participants = {};
+module:hook("muc-room-created", function(event)
+ local room = event.room;
+
+ if room.jitsiMetadata then
+ room.jitsiMetadata.allownersEnabled = true;
+ end
+end, -2); -- room_metadata should run before this module on -1
+
module:hook("muc-occupant-pre-join", function (event)
local room, occupant = event.room, event.occupant;