Skip to content

Commit 9ad48c7

Browse files
committed
rebased and fixed conflicts
1 parent 3daa11b commit 9ad48c7

File tree

3 files changed

+11
-7
lines changed

3 files changed

+11
-7
lines changed

JitsiConference.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4480,9 +4480,9 @@ export default class JitsiConference extends Listenable {
44804480
*
44814481
* @returns {Function} Handler returned to be able to remove it later.
44824482
*/
4483-
public addLobbyMessageListener(listener: (message: object) => void): Optional<EventListener> {
4483+
public addLobbyMessageListener(listener: (message: string, participantId: string) => void): Optional<(participantId: string, message: string) => void> {
44844484
if (this.room) {
4485-
return this.room.getLobby().addMessageListener(listener) as Optional<EventListener>;
4485+
return this.room.getLobby().addMessageListener(listener);
44864486
}
44874487
}
44884488

modules/xmpp/Lobby.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@ import { getLogger } from '@jitsi/logger';
22
import { $msg, Strophe } from 'strophe.js';
33

44
import { XMPPEvents } from '../../service/xmpp/XMPPEvents';
5-
import XMPP from './xmpp';
5+
66
import ChatRoom from './ChatRoom';
7+
import XMPP from './xmpp';
78

89
const logger = getLogger('xmpp:Lobby');
910

@@ -151,9 +152,9 @@ export default class Lobby {
151152
* Gets the local id for a participant in a lobby room.
152153
* This is used for lobby room private chat messages.
153154
*
154-
* @returns {string|undefined}
155+
* @returns {Optional<string>}
155156
*/
156-
getLocalId(): string | undefined {
157+
getLocalId(): Optional<string> {
157158
if (this.lobbyRoom) {
158159
return Strophe.getResourceFromJid(this.lobbyRoom.myroomjid);
159160
}
@@ -166,7 +167,7 @@ export default class Lobby {
166167
*
167168
* @returns {Function|undefined} Handler returned to be able to remove it later.
168169
*/
169-
addMessageListener(listener: (message: string, participantId: string) => void): ((participantId: string, message: any) => void) | undefined {
170+
addMessageListener(listener: (message: string, participantId: string) => void): Optional<((participantId: string, message: any) => void) > {
170171
if (this.lobbyRoom) {
171172
const handler = (participantId: string, message: string) => {
172173
listener(message, Strophe.getResourceFromJid(participantId));

modules/xmpp/xmpp.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,9 @@ interface IConnectionCredentials {
5959
*/
6060
interface IRoomCreationOptions {
6161
customDomain?: string;
62+
disableDiscoInfo?: boolean;
63+
disableFocus?: boolean;
64+
enableLobby?: boolean;
6265
statsId?: string;
6366
}
6467

@@ -1109,7 +1112,7 @@ export default class XMPP extends Listenable {
11091112
* is to be added to the jid.
11101113
* @returns {ChatRoom} Resolves with an instance of a strophe muc.
11111114
*/
1112-
public createRoom(roomName: string, options: IRoomCreationOptions, onCreateResource: (jid: string, user: any) => string): ChatRoom {
1115+
public createRoom(roomName: string, options: IRoomCreationOptions, onCreateResource?: (jid: string, user: any) => string): ChatRoom {
11131116
// Support passing the domain in a String object as part of the room name.
11141117
const domain = (roomName as { domain?: string; }).domain || options.customDomain;
11151118

0 commit comments

Comments
 (0)