瀏覽代碼

fix: Fixes av moderation logic when granting moderator.

j8
damencho 4 年之前
父節點
當前提交
737d542ca8
共有 1 個檔案被更改,包括 7 行新增1 行删除
  1. 7
    1
      resources/prosody-plugins/mod_av_moderation_component.lua

+ 7
- 1
resources/prosody-plugins/mod_av_moderation_component.lua 查看文件

64
         if moderators and occupant.role == 'moderator' then
64
         if moderators and occupant.role == 'moderator' then
65
             send_json_message(occupant.jid, moderators_body_json_str);
65
             send_json_message(occupant.jid, moderators_body_json_str);
66
         elseif occupant.jid == jid then
66
         elseif occupant.jid == jid then
67
-            send_json_message(occupant.jid, participant_body_json_str);
67
+            -- if the occupant is not moderator we send him that it is approved
68
+            -- if it is moderator we update him with the list, this is moderator joining or grant moderation was executed
69
+            if occupant.role == 'moderator' then
70
+                send_json_message(occupant.jid, moderators_body_json_str);
71
+            else
72
+                send_json_message(occupant.jid, participant_body_json_str);
73
+            end
68
         end
74
         end
69
     end
75
     end
70
 end
76
 end

Loading…
取消
儲存