Add the soju.im/no-implicit-names extension

References: https://github.com/ircv3/ircv3-ideas/issues/87
This commit is contained in:
Simon Ser 2022-03-14 13:49:01 +00:00
parent 128aefcc50
commit 43371bf347
3 changed files with 17 additions and 1 deletions

View File

@ -37,7 +37,9 @@ func forwardChannel(ctx context.Context, dc *downstreamConn, ch *upstreamChannel
}
}
sendNames(dc, ch)
if !dc.caps.IsEnabled("soju.im/no-implicit-names") {
sendNames(dc, ch)
}
}
func sendTopic(dc *downstreamConn, ch *upstreamChannel) {

View File

@ -0,0 +1,13 @@
# no-implicit-names
This is a work-in-progress specification.
## Description
This document describes the `no-implicit-names` extension. This allows clients to opt-out from the implicit `NAMES` reply servers send after `JOIN` messages.
Some clients don't need to query the list of channel members for all joined channels. Omitting this information can reduce the time taken to connect to the server, especially on mobile devices and when a large number of channels are joined.
## Implementation
The `no-implicit-names` extension introduces the `soju.im/no-implicit-names` capability. When negotiated, servers MUST NOT send an implicit `NAMES` reply after sending a `JOIN` message. Servers MUST reply to explicit `NAMES` commands sent by the client as usual.

View File

@ -231,6 +231,7 @@ var permanentDownstreamCaps = map[string]string{
"soju.im/bouncer-networks": "",
"soju.im/bouncer-networks-notify": "",
"soju.im/no-implicit-names": "",
"soju.im/read": "",
}