Always treat UpdateShortChatMessage as minigroup messages
This commit is contained in:
@@ -529,9 +529,7 @@ class AbstractUser(ABC):
|
|||||||
self, update: UpdateMessage
|
self, update: UpdateMessage
|
||||||
) -> tuple[UpdateMessageContent, pu.Puppet | None, po.Portal | None]:
|
) -> tuple[UpdateMessageContent, pu.Puppet | None, po.Portal | None]:
|
||||||
if isinstance(update, UpdateShortChatMessage):
|
if isinstance(update, UpdateShortChatMessage):
|
||||||
portal = await po.Portal.get_by_tgid(TelegramID(update.chat_id))
|
portal = await po.Portal.get_by_tgid(TelegramID(update.chat_id), peer_type="chat")
|
||||||
if not portal:
|
|
||||||
self.log.warning(f"Received message in chat with unknown type {update.chat_id}")
|
|
||||||
sender = await pu.Puppet.get_by_tgid(TelegramID(update.from_id))
|
sender = await pu.Puppet.get_by_tgid(TelegramID(update.from_id))
|
||||||
elif isinstance(update, UpdateShortMessage):
|
elif isinstance(update, UpdateShortMessage):
|
||||||
portal = await po.Portal.get_by_tgid(
|
portal = await po.Portal.get_by_tgid(
|
||||||
|
|||||||
Reference in New Issue
Block a user