From a3ed8dbce37b99ed6a5f61d03f45fe8eb60d8241 Mon Sep 17 00:00:00 2001 From: Tulir Asokan Date: Sun, 29 Apr 2018 00:25:28 +0300 Subject: [PATCH] Add missing await (ref #123) --- mautrix_telegram/portal.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mautrix_telegram/portal.py b/mautrix_telegram/portal.py index 6772a2fe..6a12f715 100644 --- a/mautrix_telegram/portal.py +++ b/mautrix_telegram/portal.py @@ -1231,7 +1231,7 @@ class Portal: async def handle_telegram_action(self, source, sender, update): action = update.action - should_ignore = (not self.mxid and not await self._create_room_on_action(source, action) + should_ignore = ((not self.mxid and not await self._create_room_on_action(source, action)) or self.is_duplicate_action(update)) if should_ignore: return @@ -1240,7 +1240,7 @@ class Portal: await self.update_title(action.title, save=True) elif isinstance(action, MessageActionChatEditPhoto): largest_size = self._get_largest_photo_size(action.photo) - self.update_avatar(source, largest_size.location, save=True) + await self.update_avatar(source, largest_size.location, save=True) elif isinstance(action, MessageActionChatAddUser): for user_id in action.users: await self.add_telegram_user(user_id, source)