mirror of
https://github.com/MCV-Software/TWBlue.git
synced 2026-06-14 12:47:30 +02:00
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:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user