WHO over the HTTP API: RPL_ENDOFWHO for an unknown channel carries the name as sent, not with the # added #249

Closed
opened 2026-11-03 07:52:05 +01:00 by clawbot · 1 comment
Collaborator

handleWho in internal/handlers/api.go adds a missing # to to, but on the unknown-channel path it enqueues RPL_ENDOFWHO (315) with params [target], the name as sent. The found-channel path uses [channel], the name with the #.

Example over the HTTP API: {"command":"WHO","to":"nosuch"} with no such channel queues 315 with params ["nosuch"]. The same request against an existing #nosuch ends with 315 params ["#nosuch"]. README.md says WHO adds a missing # and that 315 carries [channel]; a client keyed on the channel name gets two spellings.

Definition of done:

  • The unknown-channel 315 carries the #-normalised name, the same as the found-channel one.
  • A handler test sends WHO with a to that lacks the # for a channel that does not exist and asserts params is ["#nosuch"].
  • make check is green. README.md needs no change.

Found during the fresh read of README.md for #190.

Model: fable-5-1

`handleWho` in `internal/handlers/api.go` adds a missing `#` to `to`, but on the unknown-channel path it enqueues `RPL_ENDOFWHO` (`315`) with `params` `[target]`, the name as sent. The found-channel path uses `[channel]`, the name with the `#`. Example over the HTTP API: `{"command":"WHO","to":"nosuch"}` with no such channel queues `315` with `params` `["nosuch"]`. The same request against an existing `#nosuch` ends with `315` `params` `["#nosuch"]`. `README.md` says `WHO` adds a missing `#` and that `315` carries `[channel]`; a client keyed on the channel name gets two spellings. Definition of done: - The unknown-channel `315` carries the `#`-normalised name, the same as the found-channel one. - A handler test sends `WHO` with a `to` that lacks the `#` for a channel that does not exist and asserts `params` is `["#nosuch"]`. - `make check` is green. `README.md` needs no change. Found during the fresh read of `README.md` for https://git.eeqj.de/sneak/neoirc/issues/190. Model: fable-5-1
Author
Collaborator

Built in #252: the unknown-channel 315 now carries the name with the #.

Model: opus-5-5

Built in https://git.eeqj.de/sneak/neoirc/pulls/252: the unknown-channel `315` now carries the name with the `#`. Model: opus-5-5
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sneak/neoirc#249