diff --git a/debian/jitsi-meet-tokens.postrm b/debian/jitsi-meet-tokens.postrm index 264ad2a2b..797a734d7 100644 --- a/debian/jitsi-meet-tokens.postrm +++ b/debian/jitsi-meet-tokens.postrm @@ -41,7 +41,7 @@ case "$1" in sed -i 's/authentication = "token"/authentication = "anonymous"/g' $PROSODY_HOST_CONFIG sed -i "s/ app_id=\"$APP_ID\"/ --app_id=\"example_app_id\"/g" $PROSODY_HOST_CONFIG sed -i "s/ app_secret=\"$APP_SECRET\"/ --app_secret=\"example_app_secret\"/g" $PROSODY_HOST_CONFIG - sed -i 's/ modules_enabled = { "token_verification" }/ --modules_enabled = { "token_verification" }/g' $PROSODY_HOST_CONFIG + sed -i 's/ -- "token_verification"/ "token_verification"/g' $PROSODY_HOST_CONFIG if [ -x "/etc/init.d/prosody" ]; then invoke-rc.d prosody restart diff --git a/doc/debian/jitsi-meet-prosody/prosody.cfg.lua-jvb.example b/doc/debian/jitsi-meet-prosody/prosody.cfg.lua-jvb.example index 27adb4812..87653af82 100644 --- a/doc/debian/jitsi-meet-prosody/prosody.cfg.lua-jvb.example +++ b/doc/debian/jitsi-meet-prosody/prosody.cfg.lua-jvb.example @@ -26,7 +26,10 @@ VirtualHost "jitmeet.example.com" Component "conference.jitmeet.example.com" "muc" storage = "null" - --modules_enabled = { "token_verification" } + modules_enabled = { + "muc_meeting_id"; + -- "token_verification"; + } admins = { "focusUser@auth.jitmeet.example.com" } Component "jitsi-videobridge.jitmeet.example.com" diff --git a/package-lock.json b/package-lock.json index d46bd100a..f3e9f46d6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10931,8 +10931,8 @@ } }, "lib-jitsi-meet": { - "version": "github:jitsi/lib-jitsi-meet#dd31f0aff0a38b3cfd8e808e457a2e3a0f966514", - "from": "github:jitsi/lib-jitsi-meet#dd31f0aff0a38b3cfd8e808e457a2e3a0f966514", + "version": "github:jitsi/lib-jitsi-meet#24a05989ddd160ed3ef681684e158fcc05abd32a", + "from": "github:jitsi/lib-jitsi-meet#24a05989ddd160ed3ef681684e158fcc05abd32a", "requires": { "@jitsi/sdp-interop": "0.1.14", "@jitsi/sdp-simulcast": "0.2.2", diff --git a/package.json b/package.json index 4b092be09..6d00b14eb 100644 --- a/package.json +++ b/package.json @@ -57,7 +57,7 @@ "js-utils": "github:jitsi/js-utils#192b1c996e8c05530eb1f19e82a31069c3021e31", "jsrsasign": "8.0.12", "jwt-decode": "2.2.0", - "lib-jitsi-meet": "github:jitsi/lib-jitsi-meet#dd31f0aff0a38b3cfd8e808e457a2e3a0f966514", + "lib-jitsi-meet": "github:jitsi/lib-jitsi-meet#24a05989ddd160ed3ef681684e158fcc05abd32a", "libflacjs": "github:mmig/libflac.js#93d37e7f811f01cf7d8b6a603e38bd3c3810907d", "lodash": "4.17.13", "moment": "2.19.4", diff --git a/resources/prosody-plugins/mod_muc_meeting_id.lua b/resources/prosody-plugins/mod_muc_meeting_id.lua new file mode 100644 index 000000000..657853f81 --- /dev/null +++ b/resources/prosody-plugins/mod_muc_meeting_id.lua @@ -0,0 +1,34 @@ +local uuid_gen = require "util.uuid".generate; + +-- Module that generates a unique meetingId, attaches it to the room +-- and adds it to all disco info form data (when room is queried or in the +-- initial room owner config) + +-- Hook to assign meetingId for new rooms +module:hook("muc-room-created", function(event) + local room = event.room; + room._data.meetingId = uuid_gen(); + + module:log("debug", "Created meetingId:%s for %s", + room._data.meetingId, room.jid); +end); + +-- Returns the meeting config Id form data. +function getMeetingIdConfig(room) + return { + name = "muc#roominfo_meetingId"; + type = "text-single"; + label = "The meeting unique id."; + value = room._data.meetingId or ""; + }; +end + +-- add meeting Id to the disco info requests to the room +module:hook("muc-disco#info", function(event) + table.insert(event.form, getMeetingIdConfig(event.room)); +end); + +-- add the meeting Id in the default config we return to jicofo +module:hook("muc-config-form", function(event) + table.insert(event.form, getMeetingIdConfig(event.room)); +end, 90-3);