fixed choose typo

This commit is contained in:
qugalet 2023-07-24 18:47:58 +03:00
parent b8e9d7d4c0
commit 5e042670c4

View file

@ -125,7 +125,9 @@ async function main() {
if (
roomId === process.env.MATRIX_ROOM_ID &&
event['content'] &&
['т', 'н'].includes(event['content']['body'].split('\n').at(-1).trim()) &&
['y', 'n', 'т', 'н'].includes(
(event['content']['body'].split('\n').at(-1).trim() as string).toLowerCase()
) &&
event['content']['m.relates_to'] &&
event['content']['m.relates_to']['m.in_reply_to']
) {