Quellcode durchsuchen

fix: jicofo_lock is null when restored from storage (#13517)

* Fix jicofo_lock is null when restored from storage

* revert

---------

Co-authored-by: hshim432 <hshimizusv@gmail.com>
factor2
Hayato Shimizu vor 2 Jahren
Ursprung
Commit
5ce2bef556
Es ist kein Account mit der E-Mail-Adresse des Committers verbunden
1 geänderte Dateien mit 3 neuen und 3 gelöschten Zeilen
  1. 3
    3
      resources/prosody-plugins/mod_muc_meeting_id.lua

+ 3
- 3
resources/prosody-plugins/mod_muc_meeting_id.lua Datei anzeigen

@@ -81,7 +81,7 @@ module:hook('muc-occupant-pre-join', function (event)
81 81
     local room, stanza = event.room, event.stanza;
82 82
 
83 83
     -- we skip processing only if jicofo_lock is set to false
84
-    if room.jicofo_lock == false or is_healthcheck_room(stanza.attr.from) then
84
+    if room._data.jicofo_lock == false or is_healthcheck_room(stanza.attr.from) then
85 85
         return;
86 86
     end
87 87
 
@@ -89,7 +89,7 @@ module:hook('muc-occupant-pre-join', function (event)
89 89
     if ends_with(occupant.nick, '/focus') then
90 90
         module:fire_event('jicofo-unlock-room', { room = room; });
91 91
     else
92
-        room.jicofo_lock = true;
92
+        room._data.jicofo_lock = true;
93 93
         if not room.pre_join_queue then
94 94
             room.pre_join_queue = queue.new(QUEUE_MAX_SIZE);
95 95
         end
@@ -108,7 +108,7 @@ end, 8); -- just after the rate limit
108 108
 function handle_jicofo_unlock(event)
109 109
     local room = event.room;
110 110
 
111
-    room.jicofo_lock = false;
111
+    room._data.jicofo_lock = false;
112 112
     if not room.pre_join_queue then
113 113
         return;
114 114
     end

Laden…
Abbrechen
Speichern