Browse Source

fix: Uses room jids for the lobby notifications.

master
damencho 5 years ago
parent
commit
f73e9947c0
1 changed files with 7 additions and 2 deletions
  1. 7
    2
      resources/prosody-plugins/mod_muc_lobby_rooms.lua

+ 7
- 2
resources/prosody-plugins/mod_muc_lobby_rooms.lua View File

221
         local actor, occupant, room, x = event.actor, event.occupant, event.room, event.x;
221
         local actor, occupant, room, x = event.actor, event.occupant, event.room, event.x;
222
         if check_status(x, '307') then
222
         if check_status(x, '307') then
223
             -- we need to notify in the main room
223
             -- we need to notify in the main room
224
-            notify_lobby_access(room.main_room, actor, occupant.jid, false);
224
+            notify_lobby_access(room.main_room, actor, occupant.nick, false);
225
         end
225
         end
226
     end);
226
     end);
227
 end
227
 end
346
         local from = stanza:get_child('x', 'http://jabber.org/protocol/muc#user')
346
         local from = stanza:get_child('x', 'http://jabber.org/protocol/muc#user')
347
             :get_child('invite').attr.from;
347
             :get_child('invite').attr.from;
348
 
348
 
349
-        notify_lobby_access(room, from, invitee, true);
349
+        if room._data.lobbyroom then
350
+            local occupant = room._data.lobbyroom:get_occupant_by_real_jid(invitee);
351
+            if occupant then
352
+                notify_lobby_access(room, from, occupant.nick, true);
353
+            end
354
+        end
350
     end);
355
     end);
351
 end);
356
 end);
352
 
357
 

Loading…
Cancel
Save