mirror of
https://github.com/matrix-org/mjolnir.git
synced 2024-10-01 01:36:06 -04:00
Merge remote-tracking branch 'origin/main' into hs/native-e2e
This commit is contained in:
commit
873a7ba9b9
@ -1,4 +1,4 @@
|
|||||||
FROM node:alpine
|
FROM node:14-alpine
|
||||||
COPY . /tmp/src
|
COPY . /tmp/src
|
||||||
RUN cd /tmp/src \
|
RUN cd /tmp/src \
|
||||||
&& yarn install \
|
&& yarn install \
|
||||||
|
@ -50,7 +50,7 @@ docker run --rm -it -v /etc/mjolnir:/data matrixdotorg/mjolnir:latest
|
|||||||
|
|
||||||
## Build it (alternative installation)
|
## Build it (alternative installation)
|
||||||
|
|
||||||
This bot requires `yarn` and Node 10.
|
This bot requires `yarn` and Node 14.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
git clone https://github.com/matrix-org/mjolnir.git
|
git clone https://github.com/matrix-org/mjolnir.git
|
||||||
|
@ -40,5 +40,8 @@
|
|||||||
"js-yaml": "^4.1.0",
|
"js-yaml": "^4.1.0",
|
||||||
"jsdom": "^16.6.0",
|
"jsdom": "^16.6.0",
|
||||||
"matrix-bot-sdk": "^v0.6.0-beta.4"
|
"matrix-bot-sdk": "^v0.6.0-beta.4"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=14.0.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -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