Relay INVITE to IRC listener users as an INVITE line (closes #147)
check / check (push) Waiting to run
check / check (push) Waiting to run
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
This commit was merged in pull request #180.
This commit is contained in:
@@ -1261,10 +1261,9 @@ func (c *Conn) handleInvite(
|
||||
irc.RplInviting, targetNick, channel,
|
||||
)
|
||||
|
||||
// Send INVITE notice to target via service fan-out.
|
||||
body, _ := json.Marshal( //nolint:errchkjson
|
||||
[]string{"You have been invited to " + channel},
|
||||
)
|
||||
// Queue the INVITE to the target with the body the HTTP
|
||||
// API uses.
|
||||
body, _ := json.Marshal([]string{channel}) //nolint:errchkjson
|
||||
|
||||
_, _, _ = c.svc.FanOut( //nolint:dogsled // fire-and-forget broadcast
|
||||
ctx, "INVITE", c.nick, targetNick, targetID, 0,
|
||||
|
||||
Reference in New Issue
Block a user