diff --git a/react/features/base/logging/JitsiMeetLogStorage.ts b/react/features/base/logging/JitsiMeetLogStorage.ts index 373c8bdcd99f..8ce16528c49a 100644 --- a/react/features/base/logging/JitsiMeetLogStorage.ts +++ b/react/features/base/logging/JitsiMeetLogStorage.ts @@ -31,7 +31,7 @@ export default class JitsiMeetLogStorage { } /** - * The JitsiMeetLogStorage is ready when the conference has been joined. + * The JitsiMeetLogStorage is ready when the conference has been joined or when we are in the lobby waiting. * A conference is considered joined when the 'conference' field is defined * in the base/conference state. * @@ -39,9 +39,9 @@ export default class JitsiMeetLogStorage { * false otherwise. */ isReady() { - const { conference } = this.getState()['features/base/conference']; + const { conference, membersOnly } = this.getState()['features/base/conference']; - return Boolean(conference); + return Boolean(conference || membersOnly); } /** diff --git a/react/features/base/logging/middleware.ts b/react/features/base/logging/middleware.ts index 40807a801931..f3f89a664c89 100644 --- a/react/features/base/logging/middleware.ts +++ b/react/features/base/logging/middleware.ts @@ -4,10 +4,11 @@ import { AnyAction } from 'redux'; import { IStore } from '../../app/types'; import { APP_WILL_MOUNT } from '../app/actionTypes'; -import { CONFERENCE_JOINED } from '../conference/actionTypes'; +import { CONFERENCE_FAILED, CONFERENCE_JOINED } from '../conference/actionTypes'; import { getCurrentConference } from '../conference/functions'; import { SET_CONFIG } from '../config/actionTypes'; import JitsiMeetJS, { + JitsiConferenceErrors, JitsiConferenceEvents } from '../lib-jitsi-meet'; import { LIB_WILL_INIT } from '../lib-jitsi-meet/actionTypes'; @@ -32,6 +33,17 @@ MiddlewareRegistry.register(store => next => action => { case APP_WILL_MOUNT: return _appWillMount(store, next, action); + case CONFERENCE_FAILED: { + const { error } = action; + + if (error.name === JitsiConferenceErrors.MEMBERS_ONLY_ERROR) { + // init the conference logger earlier + return _conferenceJoined(store, next, action); + } + + break; + } + case CONFERENCE_JOINED: return _conferenceJoined(store, next, action); diff --git a/resources/prosody-plugins/mod_muc_lobby_rooms.lua b/resources/prosody-plugins/mod_muc_lobby_rooms.lua index 92d95e1aa78c..3f3f0e79bbd8 100644 --- a/resources/prosody-plugins/mod_muc_lobby_rooms.lua +++ b/resources/prosody-plugins/mod_muc_lobby_rooms.lua @@ -224,6 +224,7 @@ function attach_lobby_room(room, actor) new_room:set_persistent(true); module:log("info","Lobby room jid = %s created from:%s", lobby_room_jid, actor); new_room.main_room = room; + new_room._data.meetingId = room._data.meetingId; room._data.lobbyroom = new_room.jid; room:save(true); return true @@ -430,6 +431,20 @@ function process_lobby_muc_loaded(lobby_muc, host_module) notify_lobby_access(room.main_room, actor, occupant.nick, display_name, false); end end); + + -- add meeting Id to the disco info requests to the room + host_module:hook("muc-disco#info", function(event) + if not event.room._data.meetingId then + return; + end + + table.insert(event.form, { + name = "muc#roominfo_meetingId"; + type = "text-single"; + label = "The meeting unique id."; + value = event.room._data.meetingId; + }); + end); end -- process or waits to process the lobby muc component