Skip to content

Commit

Permalink
"Handle" missing database messages when handling edits
Browse files Browse the repository at this point in the history
  • Loading branch information
tulir committed Feb 17, 2018
1 parent 427d97a commit 504be22
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions mautrix_telegram/portal.py
Original file line number Diff line number Diff line change
Expand Up @@ -801,6 +801,9 @@ async def handle_telegram_edit(self, source, sender, evt):
mxid = response["event_id"]

msg = DBMessage.query.get((evt.id, tg_space))
if not msg:
# Oh crap
return
msg.mxid = mxid
msg.mx_room = self.mxid
DBMessage.query \
Expand Down

0 comments on commit 504be22

Please sign in to comment.