Always treat UpdateShortChatMessage as minigroup messages

This commit is contained in:
Tulir Asokan
2022-11-18 17:11:45 +02:00
parent 6b55d5bb41
commit 7c8cf3cb50
+1 -3
View File
@@ -529,9 +529,7 @@ class AbstractUser(ABC):
self, update: UpdateMessage
) -> tuple[UpdateMessageContent, pu.Puppet | None, po.Portal | None]:
if isinstance(update, UpdateShortChatMessage):
portal = await po.Portal.get_by_tgid(TelegramID(update.chat_id))
if not portal:
self.log.warning(f"Received message in chat with unknown type {update.chat_id}")
portal = await po.Portal.get_by_tgid(TelegramID(update.chat_id), peer_type="chat")
sender = await pu.Puppet.get_by_tgid(TelegramID(update.from_id))
elif isinstance(update, UpdateShortMessage):
portal = await po.Portal.get_by_tgid(