Browse Source

Handles unique Id for a meeting.

j8
damencho 5 years ago
parent
commit
db6a2673de

+ 1
- 1
debian/jitsi-meet-tokens.postrm View File

@@ -41,7 +41,7 @@ case "$1" in
41 41
             sed -i 's/authentication = "token"/authentication = "anonymous"/g' $PROSODY_HOST_CONFIG
42 42
             sed -i "s/ app_id=\"$APP_ID\"/ --app_id=\"example_app_id\"/g" $PROSODY_HOST_CONFIG
43 43
             sed -i "s/ app_secret=\"$APP_SECRET\"/ --app_secret=\"example_app_secret\"/g" $PROSODY_HOST_CONFIG
44
-            sed -i 's/ modules_enabled = { "token_verification" }/ --modules_enabled = { "token_verification" }/g' $PROSODY_HOST_CONFIG
44
+            sed -i 's/ -- "token_verification"/   "token_verification"/g' $PROSODY_HOST_CONFIG
45 45
 
46 46
             if [ -x "/etc/init.d/prosody" ]; then
47 47
                 invoke-rc.d prosody restart

+ 4
- 1
doc/debian/jitsi-meet-prosody/prosody.cfg.lua-jvb.example View File

@@ -26,7 +26,10 @@ VirtualHost "jitmeet.example.com"
26 26
 
27 27
 Component "conference.jitmeet.example.com" "muc"
28 28
     storage = "null"
29
-    --modules_enabled = { "token_verification" }
29
+    modules_enabled = {
30
+        "muc_meeting_id";
31
+        -- "token_verification";
32
+    }
30 33
 admins = { "focusUser@auth.jitmeet.example.com" }
31 34
 
32 35
 Component "jitsi-videobridge.jitmeet.example.com"

+ 2
- 2
package-lock.json View File

@@ -10931,8 +10931,8 @@
10931 10931
       }
10932 10932
     },
10933 10933
     "lib-jitsi-meet": {
10934
-      "version": "github:jitsi/lib-jitsi-meet#dd31f0aff0a38b3cfd8e808e457a2e3a0f966514",
10935
-      "from": "github:jitsi/lib-jitsi-meet#dd31f0aff0a38b3cfd8e808e457a2e3a0f966514",
10934
+      "version": "github:jitsi/lib-jitsi-meet#24a05989ddd160ed3ef681684e158fcc05abd32a",
10935
+      "from": "github:jitsi/lib-jitsi-meet#24a05989ddd160ed3ef681684e158fcc05abd32a",
10936 10936
       "requires": {
10937 10937
         "@jitsi/sdp-interop": "0.1.14",
10938 10938
         "@jitsi/sdp-simulcast": "0.2.2",

+ 1
- 1
package.json View File

@@ -57,7 +57,7 @@
57 57
     "js-utils": "github:jitsi/js-utils#192b1c996e8c05530eb1f19e82a31069c3021e31",
58 58
     "jsrsasign": "8.0.12",
59 59
     "jwt-decode": "2.2.0",
60
-    "lib-jitsi-meet": "github:jitsi/lib-jitsi-meet#dd31f0aff0a38b3cfd8e808e457a2e3a0f966514",
60
+    "lib-jitsi-meet": "github:jitsi/lib-jitsi-meet#24a05989ddd160ed3ef681684e158fcc05abd32a",
61 61
     "libflacjs": "github:mmig/libflac.js#93d37e7f811f01cf7d8b6a603e38bd3c3810907d",
62 62
     "lodash": "4.17.13",
63 63
     "moment": "2.19.4",

+ 34
- 0
resources/prosody-plugins/mod_muc_meeting_id.lua View File

@@ -0,0 +1,34 @@
1
+local uuid_gen = require "util.uuid".generate;
2
+
3
+-- Module that generates a unique meetingId, attaches it to the room
4
+-- and adds it to all disco info form data (when room is queried or in the
5
+-- initial room owner config)
6
+
7
+-- Hook to assign meetingId for new rooms
8
+module:hook("muc-room-created", function(event)
9
+    local room = event.room;
10
+    room._data.meetingId = uuid_gen();
11
+
12
+    module:log("debug", "Created meetingId:%s for %s",
13
+        room._data.meetingId, room.jid);
14
+end);
15
+
16
+-- Returns the meeting config Id form data.
17
+function getMeetingIdConfig(room)
18
+    return {
19
+        name = "muc#roominfo_meetingId";
20
+        type = "text-single";
21
+        label = "The meeting unique id.";
22
+        value = room._data.meetingId or "";
23
+    };
24
+end
25
+
26
+-- add meeting Id to the disco info requests to the room
27
+module:hook("muc-disco#info", function(event)
28
+    table.insert(event.form, getMeetingIdConfig(event.room));
29
+end);
30
+
31
+-- add the meeting Id in the default config we return to jicofo
32
+module:hook("muc-config-form", function(event)
33
+    table.insert(event.form, getMeetingIdConfig(event.room));
34
+end, 90-3);

Loading…
Cancel
Save