fix: filter the pile on chat flags and fetch snippets from the message index

Verified against Beeper Desktop 4.3.73 with a real token:

- inbox=primary combined with unreadOnly=true returned 0 of 78 genuinely
  unread chats, and includeMuted=false returned muted chats anyway. Both
  params are gone; muted/archived/low-priority are now decided here from
  isMuted/isArchived/isLowPriority, and a hand-marked-unread chat counts.
- Snippets now come from GET /v1/messages/search (1.1 ms/chat) instead of
  GET /v1/chats/{id}/messages (145 ms/chat), which is kept as the fallback
  for chats the index has not reached. list --limit 50 went 3.33s -> 0.16s.
This commit is contained in:
prdlk committed 2026-09-01 11:45:09 -04:00
1 parent 11624ce59c
commit 56b8c73fd1
5 files changed
+180 -51

No files matched your search

+4 -3
View File
@@ -17,14 +17,15 @@ its settings.
In Beeper Desktop: **Settings → Integrations → create an access token.**
Read access is all this plugin needs. It calls exactly six endpoints:
Read access is all this plugin needs. It calls exactly seven endpoints:
| Call | Why |
| --- | --- |
| `GET /v1/info` | Tell "Beeper is down" apart from "the token is wrong" |
| `GET /v1/accounts` | Network names for the chips, and the account count |
| `GET /v1/chats/search` | The unread pile |
| `GET /v1/chats/{chatID}/messages` | The last message, for the row snippet |
| `GET /v1/chats/search` | The unread pile (`unreadOnly=true`) |
| `GET /v1/messages/search` | The last message of a visible row, for the snippet |
| `GET /v1/chats/{chatID}/messages` | Snippet fallback for a chat the index has not reached |
| `POST /v1/chats/{chatID}/read` | Mark a chat read |
| `POST /v1/focus` | Bring Beeper Desktop forward on a chat |