Skip to content

feat: member timeout enforcement (#33) and DM voice calls (#32)#34

Merged
krazyjakee merged 1 commit into
masterfrom
feat/member-timeout-and-dm-calls
Jun 14, 2026
Merged

feat: member timeout enforcement (#33) and DM voice calls (#32)#34
krazyjakee merged 1 commit into
masterfrom
feat/member-timeout-and-dm-calls

Conversation

@krazyjakee

Copy link
Copy Markdown
Contributor

Implements two issues in one PR.

#33 — Member timeout (communication_disabled_until)

Previously the field was silently dropped on deserialize, never persisted, and never enforced — PATCH returned 200 with the member unchanged (a false success). Now:

  • UpdateMember accepts communication_disabled_until (alias timed_out_until). A double-Option distinguishes omitted (leave unchanged), explicit null (clear), and timestamp (set).
  • Setting/clearing requires moderate_members plus the hierarchy check.
  • The timestamp is validated/normalized to RFC3339 (bad input → 400) and persisted to timed_out_until.
  • Enforced: a timed-out member gets 403 on sending messages (both JSON and multipart), adding reactions, typing, and connecting to voice (REST and gateway paths). Expired/past timestamps are treated as not-timed-out.

Acceptance criteria: all four met (persist + return, permission + hierarchy gate, blocks messages, null clears).

#32 — Voice calls in DMs + call signaling

  • POST /channels/{id}/voice/join now works on dm/group_dm channels, gated by participant access instead of space permissions; LiveKit credentials are issued keyed on channel_id.
  • voice.state_update for DM calls is routed to the DM participants (target_user_ids) instead of a space.
  • New call signaling endpoints, broadcast to participants under the voice_states intent:
    • POST /channels/{id}/call/ringcall.ring
    • POST /channels/{id}/call/declinecall.decline
    • POST /channels/{id}/call/cancelcall.cancel
    • call.end is emitted automatically when a DM voice room empties on leave.
    • Accept is implicit: the callee joining voice produces the existing voice.state_update.

Notes / follow-ups

  • Protocol docs in accordserver-mcp still need updating for the new call.* events and DM voice join (separate repo).
  • Server does not implement a ring-timeout timer; ring expiry is left to the client (it can call/cancel).

Tests

Added integration tests in tests/http.rs covering timeout persist/clear/enforce (messages, reactions, voice), permission gating, invalid-timestamp rejection, expired-timeout pass-through, DM voice join success + non-participant rejection, and call ring/decline/cancel signaling. Letting CI run the suite.

Closes #33
Closes #32

🤖 Generated with Claude Code

Closes #33: communication_disabled_until is now deserialized (accepting
either communication_disabled_until or timed_out_until), gated behind
moderate_members + hierarchy, normalized to RFC3339, and persisted to
timed_out_until. A timed-out member is blocked (403) from sending
messages, adding reactions, typing, and connecting to voice until the
timeout expires; an explicit null clears it.

Closes #32: voice join is allowed on dm/group_dm channels (participant
access instead of space permissions), LiveKit credentials are issued
keyed on channel_id, and voice.state_update is routed to DM participants
rather than a space. Adds call signaling endpoints (call/ring, /decline,
/cancel) plus a call.end emitted when a DM voice room empties, all
delivered to participants under the voice_states intent.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@krazyjakee krazyjakee merged commit 4bfc07a into master Jun 14, 2026
3 checks passed
@krazyjakee krazyjakee deleted the feat/member-timeout-and-dm-calls branch June 14, 2026 00:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant