From 34c552703af95e6c3a280465af3ffd1dfb7b3236 Mon Sep 17 00:00:00 2001 From: qugalet Date: Thu, 13 Jul 2023 15:01:34 +0300 Subject: [PATCH] fixed undefined property error --- src/index.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/index.ts b/src/index.ts index 0863044..1bf9afc 100644 --- a/src/index.ts +++ b/src/index.ts @@ -85,6 +85,7 @@ async function main() { roomId === process.env.MATRIX_ROOM_ID && event['content'] && ['т', 'н'].includes(event['content']['body'].split('\n').at(-1).trim()) && + event['content']['m.relates_to'] && event['content']['m.relates_to']['m.in_reply_to'] ) { const post = await db.post.findUnique({