mirror of
https://github.com/matrix-org/matrix-hookshot.git
synced 2025-03-10 21:19:13 +00:00
Fix crash when a non-priviledged user tries to create state
This commit is contained in:
parent
ab4cabbd67
commit
6177e53012
@ -828,10 +828,14 @@ export class Bridge {
|
||||
}
|
||||
if (!existingConnections.length) {
|
||||
// Is anyone interested in this state?
|
||||
const connection = await this.connectionManager.createConnectionForState(roomId, new StateEvent(event));
|
||||
if (connection) {
|
||||
log.info(`New connected added to ${roomId}: ${connection.toString()}`);
|
||||
this.connectionManager.push(connection);
|
||||
try {
|
||||
const connection = await this.connectionManager.createConnectionForState(roomId, new StateEvent(event));
|
||||
if (connection) {
|
||||
log.info(`New connected added to ${roomId}: ${connection.toString()}`);
|
||||
this.connectionManager.push(connection);
|
||||
}
|
||||
} catch (ex) {
|
||||
log.warn(`Failed to create state for ${roomId}`, ex);
|
||||
}
|
||||
}
|
||||
return;
|
||||
|
Loading…
x
Reference in New Issue
Block a user