Skip to content

thread_leave

Leave a thread, removing yourself from its participants. The thread and its messages stay, and you can still read it if you can view the parent forum.

{
"cmd": "thread_leave",
"thread_id": "0b7d1c2e-4f3a-4e8b-9a61-5c2d7e9f1a34"
}
Field Type Required Description
thread_id string Yes ID of the thread to leave.
{
"cmd": "thread_leave",
"thread_id": "0b7d1c2e-4f3a-4e8b-9a61-5c2d7e9f1a34",
"channel": "projects",
"user": "bob",
"thread": {
"id": "0b7d1c2e-4f3a-4e8b-9a61-5c2d7e9f1a34",
"name": "My first project",
"parent_channel": "projects",
"created_by": "alice",
"created_at": 1788624000,
"locked": false,
"archived": false,
"participants": ["alice"],
"message_count": 14,
"last_message": 1788631200,
"last_message_id": "8f14e45f-ceea-467a-9575-3d3b4c1b2a10"
}
}
  • user is the username of the user who left.
  • thread is the updated thread object.
  • channel is the parent forum.

Edge cases:

  • The thread’s creator can’t leave. The call succeeds, but the creator stays in participants.
  • Leaving a thread you aren’t in also succeeds and changes nothing.

The same frame is broadcast to every other connection whose user can view the forum, without listener.

Any member can call it, including on a locked thread and while timed out.

val When
Thread not found No thread has this ID.
Validation message thread_id is missing or empty, for example thread_id: Required.