Add missing None check for outbound read receipts

This commit is contained in:
Andrew Ferrazzutti 2022-04-12 01:30:29 -04:00
parent 59c7f1fd2e
commit 33a8218eee

View File

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