Core SDK
Read receipts
Unread counts and mark-read over REST and useChat.
FluxyChat tracks per-user read position per room in D1. Clients update via REST; other members see unread badges via inbox and room list.
Mark read (SDK)
await client.markReadRest("general", latestMessageId);Or enable automatic read on mount:
useChat({ roomId, client, markReadLatest: true });Unread catch-up
const { unreadCount, firstUnreadMessageId } = await client.getRoomCatchUp(roomId);REST
| Method | Path | Description |
|---|---|---|
| POST | /rooms/{id}/read | Body { messageId } |
| GET | /rooms/{id}/unread | Unread count + first unread id |
| GET | /rooms?userId= | Room list includes unreadCount per room |
Read receipts sync to Inbox and the user channel (inbox_updated events).