浏览代码

fix(breakout-rooms) fix error in case main room is no longer available

master
Saúl Ibarra Corretgé 3 年前
父节点
当前提交
ef93584c2b
共有 1 个文件被更改,包括 5 次插入0 次删除
  1. 5
    0
      resources/prosody-plugins/mod_muc_breakout_rooms.lua

+ 5
- 0
resources/prosody-plugins/mod_muc_breakout_rooms.lua 查看文件

@@ -487,6 +487,11 @@ function process_breakout_rooms_muc_loaded(breakout_rooms_muc, host_module)
487 487
     room_mt.get_members_only = function(room)
488 488
         local main_room = get_main_room(room.jid);
489 489
 
490
+        if not main_room then
491
+            module:log('error', 'No main room (%s)!', room.jid);
492
+            return false;
493
+        end
494
+
490 495
         return main_room.get_members_only(main_room)
491 496
     end
492 497
 

正在加载...
取消
保存