Skip to content

FMSG-006 indicators: POST /fmsg/:id/indicate and the indicator event - #64

Merged
markmnl merged 1 commit into
mainfrom
fmsg-006-indicators
Oct 31, 2026
Merged

markmnl merged 1 commit into
mainfrom
fmsg-006-indicators

Conversation

@markmnl

@markmnl markmnl commented Oct 31, 2026

Copy link
Copy Markdown
Owner

Client API for FMSG-006 Indicators.

  • POST /fmsg/:id/indicate {emoji, ttl}:
    • A participant of a sent, non-terminal message shows or clears a short-lived single-emoji state on it, such as ✍️ composing a reply.
    • Answers 202 Accepted with no body.
    • The emoji is validated as for reactions. ttl defaults to 6 and is clamped to 120. An empty emoji or ttl 0 clears.
    • More than one per second per identity and message is accepted but dropped. Clears always go through.
    • Errors: 400, 403, 404 and 409, like react.
  • Nothing stored: the indicator is published on NOTIFY indicator as {id, from, emoji, ttl}.
  • The hub LISTENs on it on every instance. It sends an indicator WebSocket event {id, root_id, from, emoji, ttl} to the message's other connected participants, with no Web Push.
  • The host can LISTEN on the same channel to send the indicator to other hosts over UDP, and NOTIFY it for indicators it receives (fmsgd PR to follow). So the channel works in both directions with one payload shape.
  • OAuth: delegated tokens need the write scope.
  • README: the route section, a routes-table row and the WS event.

Tests:

  • hub routing: delivers to participants, skips the sender and outsiders, adds the root id, drops malformed payloads;
  • the throttle;
  • integration against Postgres 17:
    • NOTIFY payloads for set, clear and clamp, and the throttle;
    • 400, 403, 404 and 409;
    • nothing stored;
    • the audience and root.

go test ./... passes.

🤖 Generated with Claude Code

A participant of a sent, non-terminal message can show or clear a
short-lived single-emoji state on it (such as composing a reply). Nothing
is stored: the indicator is published on the NOTIFY channel "indicator"
as {id, from, emoji, ttl}; each instance's WebSocket hub sends it to the
message's other connected participants as an "indicator" event with the
thread's root id, and the host can send it on to other hosts. ttl
defaults to 6 and is clamped to 120; an empty emoji or ttl 0 clears;
more than one per second per identity and message is dropped. Open to
delegated OAuth tokens with the write scope.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@markmnl
markmnl merged commit 75fd498 into main Oct 31, 2026
1 check passed
@markmnl
markmnl deleted the fmsg-006-indicators branch October 31, 2026 09:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant