Silently handle inbound "feed" messages

They seem to be pure metadata, so don't post them as messages
This commit is contained in:
Andrew Ferrazzutti 2022-04-10 05:07:41 -04:00
parent 87b41fbdcc
commit 370865c2c1

View File

@ -190,6 +190,7 @@ class Portal(DBPortal, BasePortal):
# TODO More
cls._chat_type_handler_map = {
KnownChatType.FEED: cls._handle_kakaotalk_feed,
KnownChatType.TEXT: cls._handle_kakaotalk_text,
KnownChatType.REPLY: cls._handle_kakaotalk_reply,
KnownChatType.PHOTO: cls._handle_kakaotalk_photo,
@ -1103,6 +1104,15 @@ class Portal(DBPortal, BasePortal):
events.append(await self._send_message(intent, content, timestamp=timestamp))
return events
async def _handle_kakaotalk_feed(
self,
timestamp: int,
chat_text: str | None,
**_
) -> list[EventID]:
self.log.info("Got feed message at %s: %s", timestamp, chat_text or "none")
return []
async def _handle_kakaotalk_text(
self,
intent: IntentAPI,