mirror of
https://github.com/matrix-org/mjolnir.git
synced 2024-07-01 00:51:36 +00:00
Stop reacting to reports Mjolnir didn't send in report manager.
This commit is contained in:
parent
941d10b015
commit
6a723eaa1b
|
@ -142,6 +142,11 @@ export class ReportManager {
|
||||||
let initialNoticeReport: IReport | undefined, confirmationReport: IReportWithAction | undefined;
|
let initialNoticeReport: IReport | undefined, confirmationReport: IReportWithAction | undefined;
|
||||||
try {
|
try {
|
||||||
let originalEvent = await this.mjolnir.client.getEvent(roomId, relation.event_id);
|
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)) {
|
if (!("content" in originalEvent)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user