When the server refuses a JOIN, POST /api/v1/messages answers HTTP 200 with {"status": "error"} and sends the error numeric to the message queue. Both clients opened the channel anyway.
neoirc-cli: JoinChannel in internal/cli/api now returns an error unless the response status is joined. cmdJoin already stops on an error, so its buffer and target stay as they were. An error reads better than a second return value: no caller changes.
Web client: joinChannel opens no tab unless the status is joined. The rejoin of saved channels when a fresh session starts gets the same check, since it opened tabs the same way.
The error numeric still shows in the web client's Server tab and the neoirc-cli status buffer.
How item 1 was checked: a headless browser drove the web client of this branch and of next, each built into a local neoircd. It sent /join for an open channel, a bad channel name and an invite-only channel, then logged in fresh with the invite-only channel saved. On next each refused join added a tab; on this branch none did, the active tab stayed put, and the Server tab showed the error numerics.
Disclosures:
Judgement call: the saved-channel rejoin in onLogin is fixed too. The issue names only joinChannel, but its definition of done covers any refused join from the web client.
Judgement call: on a refused join neoirc-cli also prints "Join failed: the server refused the join" in its status buffer, through its existing error path.
Model: opus-5-5
Closes https://git.eeqj.de/sneak/neoirc/issues/197.
When the server refuses a `JOIN`, `POST /api/v1/messages` answers HTTP 200 with `{"status": "error"}` and sends the error numeric to the message queue. Both clients opened the channel anyway.
- `neoirc-cli`: `JoinChannel` in `internal/cli/api` now returns an error unless the response status is `joined`. `cmdJoin` already stops on an error, so its buffer and target stay as they were. An error reads better than a second return value: no caller changes.
- Web client: `joinChannel` opens no tab unless the status is `joined`. The rejoin of saved channels when a fresh session starts gets the same check, since it opened tabs the same way.
The error numeric still shows in the web client's Server tab and the `neoirc-cli` status buffer.
How item 1 was checked: a headless browser drove the web client of this branch and of `next`, each built into a local `neoircd`. It sent `/join` for an open channel, a bad channel name and an invite-only channel, then logged in fresh with the invite-only channel saved. On `next` each refused join added a tab; on this branch none did, the active tab stayed put, and the Server tab showed the error numerics.
Disclosures:
- Judgement call: the saved-channel rejoin in `onLogin` is fixed too. The issue names only `joinChannel`, but its definition of done covers any refused join from the web client.
- Judgement call: on a refused join `neoirc-cli` also prints "Join failed: the server refused the join" in its status buffer, through its existing error path.
Model: opus-5-5
When the server refuses a JOIN, POST /api/v1/messages answers 200
with status "error" and sends the error numeric to the queue. Both
clients opened the channel anyway.
JoinChannel in internal/cli/api now returns an error unless the
status is "joined". cmdJoin then keeps its buffer and target and
prints its usual "Join failed" line. The web client opens no tab for
a refused join, whether it came from /join or from the saved
channels a fresh session joins again.
Model: opus-5-5
PASS: a refused join now leaves both clients as they were while the error numeric still shows, and the new internal/cli test fails without the fix.
Judgement call: as README.md documents, the server also refuses a member's own repeat JOIN once the channel is +i, +k or full, so neither client switches to that channel on /join any more; I read this as the rule #197 asks for, not a defect.
Model: opus-5-5
PASS: a refused join now leaves both clients as they were while the error numeric still shows, and the new `internal/cli` test fails without the fix.
Judgement call: as `README.md` documents, the server also refuses a member's own repeat `JOIN` once the channel is `+i`, `+k` or full, so neither client switches to that channel on `/join` any more; I read this as the rule https://git.eeqj.de/sneak/neoirc/issues/197 asks for, not a defect.
Model: opus-5-5
clawbot
merged commit 229c89e1f8 into next2026-10-27 05:09:01 +01:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Closes #197.
When the server refuses a
JOIN,POST /api/v1/messagesanswers HTTP 200 with{"status": "error"}and sends the error numeric to the message queue. Both clients opened the channel anyway.neoirc-cli:JoinChannelininternal/cli/apinow returns an error unless the response status isjoined.cmdJoinalready stops on an error, so its buffer and target stay as they were. An error reads better than a second return value: no caller changes.joinChannelopens no tab unless the status isjoined. The rejoin of saved channels when a fresh session starts gets the same check, since it opened tabs the same way.The error numeric still shows in the web client's Server tab and the
neoirc-clistatus buffer.How item 1 was checked: a headless browser drove the web client of this branch and of
next, each built into a localneoircd. It sent/joinfor an open channel, a bad channel name and an invite-only channel, then logged in fresh with the invite-only channel saved. Onnexteach refused join added a tab; on this branch none did, the active tab stayed put, and the Server tab showed the error numerics.Disclosures:
onLoginis fixed too. The issue names onlyjoinChannel, but its definition of done covers any refused join from the web client.neoirc-clialso prints "Join failed: the server refused the join" in its status buffer, through its existing error path.Model: opus-5-5
clawbot referenced this pull request2026-10-27 04:58:59 +01:00
PASS: a refused join now leaves both clients as they were while the error numeric still shows, and the new
internal/clitest fails without the fix.Judgement call: as
README.mddocuments, the server also refuses a member's own repeatJOINonce the channel is+i,+kor full, so neither client switches to that channel on/joinany more; I read this as the rule #197 asks for, not a defect.Model: opus-5-5