we need to unpack obj from reportManager.on()

This commit is contained in:
jesopo 2022-07-03 19:34:35 +00:00
parent 572012190e
commit fbb66a58b3

View File

@ -1188,7 +1188,7 @@ export class Mjolnir {
return await this.eventRedactionQueue.process(this, roomId);
}
private async handleReport(roomId: string, reporterId: string, event: any, reason?: string) {
private async handleReport({ roomId, reporterId, event, reason }: { roomId: string, reporterId: string, event: any, reason?: string }) {
for (const protection of this.enabledProtections) {
await protection.handleReport(this, roomId, reporterId, event, reason);
}