fixed undefined property error

This commit is contained in:
qugalet 2023-07-13 15:01:34 +03:00
parent 338e9be540
commit 34c552703a

View file

@ -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({