rename replay query parameter to initChannelState
Some checks failed
check / check (push) Has been cancelled

Rename ?replay=1 to ?initChannelState=1 across server, SPA, and docs
per review feedback: the parameter initialises fresh channel state
rather than replaying past state.

- Rename replayChannelState() to initChannelState()
- Update query parameter check in HandleState
- Update SPA fetch URL and comments
- Update README documentation and curl examples
This commit is contained in:
clawbot
2026-03-09 17:00:25 -07:00
parent e9e0151950
commit ab49c32148
5 changed files with 21 additions and 20 deletions

4
web/dist/app.js vendored

File diff suppressed because one or more lines are too long

View File

@@ -70,7 +70,7 @@ function LoginScreen({ onLogin }) {
.catch(() => {});
const saved = localStorage.getItem("neoirc_token");
if (saved) {
api("/state?replay=1")
api("/state?initChannelState=1")
.then((u) => onLogin(u.nick, true))
.catch(() => localStorage.removeItem("neoirc_token"));
}
@@ -335,7 +335,7 @@ function App() {
if (msg.to) addMessage(msg.to, { ...base, text, system: true });
if (msg.to && msg.to.startsWith("#")) {
// Create a tab when the current user joins a channel
// (including replayed JOINs on reconnect).
// (including initial JOINs on reconnect).
if (msg.from === nickRef.current) {
setTabs((prev) => {
if (
@@ -656,8 +656,8 @@ function App() {
if (isResumed) {
// Request MOTD on resumed sessions (new sessions
// get it automatically from the server during
// creation). Channel state is replayed by the
// server via the message queue (?replay=1), so we
// creation). Channel state is initialised by the
// server via the message queue (?initChannelState=1), so we
// do not need to re-JOIN channels here.
try {
await api("/messages", {