Fix unknown sender names in Bluesky chats, reduce false notifications, and reorder Chats buffer

Resolve sender DIDs to display names by building member maps from conversation
data. Fix compose functions to prefer snake_case attributes (ATProto SDK convention).
Ensure stable key comparison in dedup logic by converting ATProto objects to strings.
Move Chats buffer to appear after Mentions and before Notifications.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Jesús Pavón Abián
2026-02-18 08:46:17 +01:00
parent 83781e521e
commit e115464cc8
5 changed files with 97 additions and 20 deletions
+12
View File
@@ -751,6 +751,18 @@ class Session(base.baseSession):
log.exception("Error listing conversations")
return {"items": [], "cursor": None}
def get_convo(self, convo_id: str):
"""Fetch a single conversation by ID, returning the convo object or None."""
api = self._ensure_client()
dm_client = api.with_bsky_chat_proxy()
dm = dm_client.chat.bsky.convo
try:
res = dm.get_convo({"convoId": convo_id})
return res.convo
except Exception:
log.exception("Error fetching conversation %s", convo_id)
return None
def get_convo_messages(self, convo_id: str, limit: int = 50, cursor: str | None = None) -> dict[str, Any]:
api = self._ensure_client()
dm_client = api.with_bsky_chat_proxy()