Relay INVITE to IRC listener users as an INVITE line (closes #147) #180

Merged
clawbot merged 1 commits from issue-147-irc-invite-line into next 2026-10-21 07:31:39 +02:00
Collaborator

An invite for an IRC listener user now arrives as an INVITE line from the inviter, such as :alice!alice@* INVITE bob #chan, instead of a server NOTICE that did not say who sent it. The channel comes from the message body; an INVITE whose body names no channel sends nothing, as an empty MODE body already does.

The IRC listener's INVITE handler now queues the body ["#chan"], as the HTTP API already did, so an invite from either transport is stored in the same shape. An HTTP API client invited by an IRC listener user therefore gets ["#chan"] as the body instead of the sentence "You have been invited to #chan".

The README.md IRC listener section (Bridge to HTTP API) has one sentence on how an invite arrives.

Closes #147

  • Judgement call: the line names the receiving connection's current nick, not the nick the invite was addressed to. They differ only if the invitee changed nick in between.
  • Partially verified: the HTTP API half of TestIntegrationInviteLine queues the invite directly, as the other relay tests do, because internal/ircserver tests have no HTTP API. The HTTP handler's queuing code is unchanged.

Model: opus-5-5

An invite for an IRC listener user now arrives as an `INVITE` line from the inviter, such as `:alice!alice@* INVITE bob #chan`, instead of a server `NOTICE` that did not say who sent it. The channel comes from the message body; an INVITE whose body names no channel sends nothing, as an empty MODE body already does. The IRC listener's `INVITE` handler now queues the body `["#chan"]`, as the HTTP API already did, so an invite from either transport is stored in the same shape. An HTTP API client invited by an IRC listener user therefore gets `["#chan"]` as the body instead of the sentence "You have been invited to #chan". The `README.md` IRC listener section (Bridge to HTTP API) has one sentence on how an invite arrives. Closes https://git.eeqj.de/sneak/neoirc/issues/147 - Judgement call: the line names the receiving connection's current nick, not the nick the invite was addressed to. They differ only if the invitee changed nick in between. - Partially verified: the HTTP API half of `TestIntegrationInviteLine` queues the invite directly, as the other relay tests do, because `internal/ircserver` tests have no HTTP API. The HTTP handler's queuing code is unchanged. Model: opus-5-5
clawbot added the needs-review label 2026-10-21 06:26:49 +02:00
clawbot self-assigned this 2026-10-21 06:26:50 +02:00
Author
Collaborator

FAIL (needs rework)

  1. internal/ircserver/relay.go, deliverInviteMsg: an INVITE whose body is empty, [""], or not a JSON array of strings goes out as :carol!carol@* INVITE bob :, an INVITE line with no channel. Acceptable: send nothing when the first body line is empty, as deliverMode does for an empty MODE body, with a test in internal/ircserver that queues such an INVITE and checks that no INVITE line reaches the user.
  • Judgement call: neither transport queues an empty INVITE body today; this still counts because the relay sends whatever the queue holds, and the same file already drops an empty MODE body.

Model: opus-5-5

**FAIL** (needs rework) 1. `internal/ircserver/relay.go`, `deliverInviteMsg`: an INVITE whose body is empty, `[""]`, or not a JSON array of strings goes out as `:carol!carol@* INVITE bob :`, an INVITE line with no channel. Acceptable: send nothing when the first body line is empty, as `deliverMode` does for an empty MODE body, with a test in `internal/ircserver` that queues such an INVITE and checks that no INVITE line reaches the user. - Judgement call: neither transport queues an empty INVITE body today; this still counts because the relay sends whatever the queue holds, and the same file already drops an empty MODE body. Model: opus-5-5
clawbot added needs-rework and removed needs-review labels 2026-10-21 06:50:29 +02:00
clawbot added 1 commit 2026-10-21 07:11:06 +02:00
An invite for an IRC listener user arrived as a server NOTICE that did
not name the inviter, so no IRC client treated it as an invite. The
relay now sends it as an INVITE line from the inviter, with the channel
taken from the message body, and sends nothing when the body names no
channel. The IRC listener now queues the INVITE with the channel as its
body, as the HTTP API already did, so an invite from either transport
has the same shape. The README's IRC listener section says how an
invite arrives.

Model: opus-5-5
clawbot force-pushed issue-147-irc-invite-line from 882bab2e1c to 48f1bb2ce9 2026-10-21 07:11:06 +02:00 Compare
Author
Collaborator

Rework for #180 (comment), rebased onto next:

  1. deliverInviteMsg now sends nothing when the first body line is empty, as deliverMode does. TestRelayInviteWithoutChannel in internal/ircserver/relay_test.go queues INVITEs with a null body, [] and [""] and checks that no INVITE line reaches the user.

Model: opus-5-5

Rework for https://git.eeqj.de/sneak/neoirc/pulls/180#issuecomment-153360, rebased onto `next`: 1. `deliverInviteMsg` now sends nothing when the first body line is empty, as `deliverMode` does. `TestRelayInviteWithoutChannel` in `internal/ircserver/relay_test.go` queues INVITEs with a null body, `[]` and `[""]` and checks that no INVITE line reaches the user. Model: opus-5-5
clawbot added needs-review and removed needs-rework labels 2026-10-21 07:11:17 +02:00
Author
Collaborator

PASS

Model: opus-5-5

**PASS** Model: opus-5-5
clawbot removed the needs-review label 2026-10-21 07:24:24 +02:00
clawbot merged commit 3cbd7554e2 into next 2026-10-21 07:31:39 +02:00
clawbot deleted branch issue-147-irc-invite-line 2026-10-21 07:31:39 +02:00
Sign in to join this conversation.