Ignore quotes

This commit is contained in:
Evert Prants 2024-06-07 23:10:57 +03:00
parent a517031290
commit f2e46d3208
Signed by: evert
GPG Key ID: 1688DA83D222D0B5
3 changed files with 7 additions and 4 deletions

View File

@ -3,7 +3,7 @@
"name": "matrix", "name": "matrix",
"description": "Matrix.org Service for Squeebot 3", "description": "Matrix.org Service for Squeebot 3",
"tags": ["service", "matrix"], "tags": ["service", "matrix"],
"version": "1.3.3", "version": "1.3.4",
"dependencies": ["control?"], "dependencies": ["control?"],
"npmDependencies": ["matrix-bot-sdk@0.6.6"] "npmDependencies": ["matrix-bot-sdk@0.6.6"]
} }

View File

@ -165,8 +165,11 @@ class MatrixProtocol extends Protocol {
return; return;
} }
// Don't handle non-text events // Don't handle non-text events and quote replies
if (!['m.text', 'm.emote'].includes(event.content.msgtype)) { if (
!['m.text', 'm.emote'].includes(event.content.msgtype) ||
event.content['m.relates_to']?.['m.in_reply_to']
) {
return; return;
} }
const msg = event.content.body; const msg = event.content.body;

View File

@ -3,7 +3,7 @@
"plugins": [ "plugins": [
{ {
"name": "matrix", "name": "matrix",
"version": "1.3.3" "version": "1.3.4"
} }
], ],
"typescript": true "typescript": true