Rename replay → initChannelState
All checks were successful
check / check (push) Successful in 2m20s

Rename the query parameter, function, and all related comments
from 'replay' to 'initChannelState' to better reflect the
semantics: the server initializes channel state for the
reconnecting client rather than replaying past events.
This commit is contained in:
2026-03-09 17:00:52 -07:00
committed by user
parent 096fb2b207
commit 78d657111b
5 changed files with 23 additions and 21 deletions

View File

@@ -1036,7 +1036,7 @@ Return the current user's session state.
| Parameter | Type | Default | Description |
|-----------|--------|---------|-------------|
| `replay` | string | (none) | When set to `1`, enqueues synthetic JOIN + TOPIC + NAMES messages for every channel the session belongs to into the calling client's queue. Used by the SPA on reconnect to restore channel tabs without re-sending JOIN commands. |
| `initChannelState` | string | (none) | When set to `1`, enqueues synthetic JOIN + TOPIC + NAMES messages for every channel the session belongs to into the calling client's queue. Used by the SPA on reconnect to restore channel tabs without re-sending JOIN commands. |
**Response:** `200 OK`
```json
@@ -1070,9 +1070,9 @@ curl -s http://localhost:8080/api/v1/state \
-H "Authorization: Bearer $TOKEN" | jq .
```
**Reconnect with channel replay:**
**Reconnect with channel state initialization:**
```bash
curl -s "http://localhost:8080/api/v1/state?replay=1" \
curl -s "http://localhost:8080/api/v1/state?initChannelState=1" \
-H "Authorization: Bearer $TOKEN" | jq .
```