Rename replay → initChannelState
All checks were successful
check / check (push) Successful in 2m20s
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:
2
web/dist/app.js
vendored
2
web/dist/app.js
vendored
File diff suppressed because one or more lines are too long
@@ -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 JOINs from initChannelState on reconnect).
|
||||
if (msg.from === nickRef.current) {
|
||||
setTabs((prev) => {
|
||||
if (
|
||||
@@ -656,9 +656,10 @@ 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
|
||||
// do not need to re-JOIN channels here.
|
||||
// creation). Channel state is initialized by the
|
||||
// server via the message queue
|
||||
// (?initChannelState=1), so we do not need to
|
||||
// re-JOIN channels here.
|
||||
try {
|
||||
await api("/messages", {
|
||||
method: "POST",
|
||||
|
||||
Reference in New Issue
Block a user