Compare commits

...

2 Commits

Author SHA1 Message Date
damencho
306cc540aa feat(logging): Init the conference logger when joining lobby.
To be able to gather logs for a meeting while waiting in the lobby.
2024-09-26 12:20:34 -05:00
damencho
87920a5156 feat(lobby): Adds main meeting id to the lobby room muc. 2024-09-25 12:26:48 -05:00
3 changed files with 31 additions and 4 deletions

View File

@@ -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 {
* <tt>false</tt> otherwise.
*/
isReady() {
const { conference } = this.getState()['features/base/conference'];
const { conference, membersOnly } = this.getState()['features/base/conference'];
return Boolean(conference);
return Boolean(conference || membersOnly);
}
/**

View File

@@ -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);

View File

@@ -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