Skip to content

Commit

Permalink
Merge pull request #19 from Half-Shot/hs/check-sender-before-updating…
Browse files Browse the repository at this point in the history
…-activity

Check sender before updating activity
  • Loading branch information
Half-Shot authored Nov 19, 2021
2 parents 24d9dad + 31015a2 commit 3cd1360
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mautrix_telegram/portal/telegram.py
Original file line number Diff line number Diff line change
Expand Up @@ -707,8 +707,8 @@ async def handle_telegram_message(self, source: 'AbstractUser', sender: p.Puppet
"the likely duplicate message now.")
await intent.redact(self.mxid, event_id)
return

UserActivity.update_for_puppet(sender, evt.date)
if sender:
UserActivity.update_for_puppet(sender, evt.date)
self.log.debug("Handled telegram message %d -> %s", evt.id, event_id)
try:
DBMessage(tgid=TelegramID(evt.id), mx_room=self.mxid, mxid=event_id,
Expand Down

0 comments on commit 3cd1360

Please sign in to comment.