Catching error when JWT token cannot be generated to avoid crashing Pusher
This commit is contained in:
parent
3eec41a1d0
commit
a28fcbb9e6
@ -509,6 +509,7 @@ export class SocketManager implements ZoneEventListener {
|
||||
|
||||
|
||||
public handleQueryJitsiJwtMessage(client: ExSocketInterface, queryJitsiJwtMessage: QueryJitsiJwtMessage) {
|
||||
try {
|
||||
const room = queryJitsiJwtMessage.getJitsiroom();
|
||||
const tag = queryJitsiJwtMessage.getTag(); // FIXME: this is not secure. We should load the JSON for the current room and check rights associated to room instead.
|
||||
|
||||
@ -543,6 +544,9 @@ export class SocketManager implements ZoneEventListener {
|
||||
serverToClientMessage.setSendjitsijwtmessage(sendJitsiJwtMessage);
|
||||
|
||||
client.send(serverToClientMessage.serializeBinary().buffer, true);
|
||||
} catch (e) {
|
||||
console.error('An error occured while generating the Jitsi JWT token: ', e);
|
||||
}
|
||||
}
|
||||
|
||||
public emitSendUserMessage(userUuid: string, message: string, type: string): void {
|
||||
|
Loading…
Reference in New Issue
Block a user