Merge remote-tracking branch 'origin/main' into hs/native-e2e

This commit is contained in:
Half-Shot 2022-01-20 12:25:44 +00:00
commit 873a7ba9b9
4 changed files with 10 additions and 2 deletions

View File

@ -1,4 +1,4 @@
FROM node:alpine
FROM node:14-alpine
COPY . /tmp/src
RUN cd /tmp/src \
&& yarn install \

View File

@ -50,7 +50,7 @@ docker run --rm -it -v /etc/mjolnir:/data matrixdotorg/mjolnir:latest
## Build it (alternative installation)
This bot requires `yarn` and Node 10.
This bot requires `yarn` and Node 14.
```bash
git clone https://github.com/matrix-org/mjolnir.git

View File

@ -40,5 +40,8 @@
"js-yaml": "^4.1.0",
"jsdom": "^16.6.0",
"matrix-bot-sdk": "^v0.6.0-beta.4"
},
"engines": {
"node": ">=14.0.0"
}
}

View File

@ -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;
}