From 6a723eaa1bd4b4d65cd9d5c72cc25c48e4c64664 Mon Sep 17 00:00:00 2001 From: gnuxie Date: Tue, 18 Jan 2022 11:08:17 +0000 Subject: [PATCH] Stop reacting to reports Mjolnir didn't send in report manager. --- src/report/ReportManager.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/report/ReportManager.ts b/src/report/ReportManager.ts index 0b7c66e..74fd124 100644 --- a/src/report/ReportManager.ts +++ b/src/report/ReportManager.ts @@ -142,6 +142,11 @@ export class ReportManager { let initialNoticeReport: IReport | undefined, confirmationReport: IReportWithAction | undefined; try { let originalEvent = await this.mjolnir.client.getEvent(roomId, relation.event_id); + if (originalEvent.sender !== await this.mjolnir.client.getUserId()) { + // Let's not handle reactions to events we didn't send as + // some setups have two or more Mjolnir's in the same management room. + return; + } if (!("content" in originalEvent)) { return; }