From 33a8218eee5a20af8d94a4ce46cc4171431d525b Mon Sep 17 00:00:00 2001 From: Andrew Ferrazzutti Date: Tue, 12 Apr 2022 01:30:29 -0400 Subject: [PATCH] Add missing None check for outbound read receipts --- matrix_appservice_kakaotalk/matrix.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/matrix_appservice_kakaotalk/matrix.py b/matrix_appservice_kakaotalk/matrix.py index 1930502..dc8a80b 100644 --- a/matrix_appservice_kakaotalk/matrix.py +++ b/matrix_appservice_kakaotalk/matrix.py @@ -157,7 +157,8 @@ class MatrixHandler(BaseMatrixHandler): if not user.is_connected: return message = await DBMessage.get_by_mxid(event_id, portal.mxid) - await user.client.mark_read(portal.channel_props, message.ktid) + if message: + await user.client.mark_read(portal.channel_props, message.ktid) async def handle_ephemeral_event( self, evt: ReceiptEvent | Event