Skip to content

add pre-away extension#514

Merged
jwheare merged 4 commits intoircv3:masterfrom
slingamn:preaway.1
Aug 3, 2023
Merged

add pre-away extension#514
jwheare merged 4 commits intoircv3:masterfrom
slingamn:preaway.1

Conversation

@slingamn
Copy link
Copy Markdown
Contributor

@slingamn slingamn commented Feb 2, 2023

This comes out of ircv3/ircv3-ideas#96 . It provides a mechanism to indicate that a new connection was not initiated by an end user and does not indicate that the end user is present. The core objective is to work with auto-away systems, but the mechanism is potentially more general.

@slingamn
Copy link
Copy Markdown
Contributor Author

slingamn commented Feb 2, 2023

cc @emersion @causal-agent

@sadiepowell
Copy link
Copy Markdown
Contributor

sadiepowell commented Feb 2, 2023

This seems like it just overcomplicates the problem. Why not use an unrequestable cap that tells clients they can send AWAY with a normal message before connection registration is complete like with sts?

Never mind, I think I understand what problem this is also trying to solve.

@progval
Copy link
Copy Markdown
Contributor

progval commented Feb 2, 2023

@SadieCat This spec does that and defines AWAY * which tells the bouncer/server not to change the away status because of this connection

emersion added a commit to emersion/soju that referenced this pull request Feb 2, 2023
@emersion
Copy link
Copy Markdown
Contributor

emersion commented Feb 2, 2023

@slingamn
Copy link
Copy Markdown
Contributor Author

slingamn commented Feb 3, 2023

cc @kylef : can FOREGROUND / BACKGROUND be translated into AWAY and AWAY * under this specification?

@slingamn
Copy link
Copy Markdown
Contributor Author

slingamn commented Feb 5, 2023

From implementing this in Ergo (ergochat/ergo#2044) and discussion with @emersion, two changes:

  1. Negotiating the capability is now required; this gives server implementations more information, at negligible cost
  2. Explicitly mention AWAY * post-registration (this is the intended flow for "backgrounding" a mobile app)

@kylef
Copy link
Copy Markdown
Contributor

kylef commented Feb 5, 2023

@slingamn its not quite the same thing. They have different semantics as BACKGROUND/FOREGROUND are (client -> bouncer) whereas AWAY/UNAWAY is (client -> bouncer -> server). BACKGROUND/FOREGROUND do not leak the away state of the client to other clients.

If that could be a privacy concern for a user I do not know. In Palaver "auto away" is not enabled by default. BACKGROUND/FOREGROUND will be sent for supporting servers regardless of the user's "auto away" preference as it is for managing notification state and not exposing an away state.

Slightly related, in ZNC (using the clientaway module), a per-client away state can be configured, where if all clients have decided to be away then the away can (optionally) be propagated to the upstream server (to be visible by other clients). I presume that is the desirable behaviour with the proposed specification and what we might see in Ergo utilising pre-away?

@kylef
Copy link
Copy Markdown
Contributor

kylef commented Feb 5, 2023

  1. Explicitly mention AWAY * post-registration (this is the intended flow for "backgrounding" a mobile app)

With a mobile application, you may also be going away/unaway very frequently and may not want this to by directly visible to others IRC users when jumping back and fourth between applications. In this context if AWAY/UNAWAY is a proposed alternative to BACKGROUND/FOREGROUND, it may be desirable for server implementations to offer some form of "delay" so that if a client aways and unaways within 10 seconds for example, it is not the user's away state.

@slingamn
Copy link
Copy Markdown
Contributor Author

slingamn commented Feb 5, 2023

Thanks, that makes sense. What information do BACKGROUND and FOREGROUND convey to to the bouncer? Or rather, how does the bouncer make use of that information?


If the client's nickname was not already present on the server, then `AWAY` pre-registration sets the away message but does not inhibit reporting of the change in nickname status, e.g. via [monitor][monitor].

Clients receiving `*` as an away message (for example, in `301 RPL_AWAY` or [away-notify][away-notify]) SHOULD treat it as indicating that the user is not present for an unspecified reason. Servers MAY substitute a human-readable message for the `*` if it would otherwise be relayed as an away message.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you clarify whether this means a client receiving it for themself or other users? If it's the latter then this gonna cause weird behaviours on servers that don't support the spec. Might be best to require servers to rewrite it to something sensible?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If I changed it to say "Clients having negotiated the capability", would that alleviate concerns about behavior on servers not supporting the spec?

@slingamn
Copy link
Copy Markdown
Contributor Author

slingamn commented Feb 5, 2023

I think the language is more clear now:

  • If the capability is negotiated, * has a special meaning in both directions (albeit only at the SHOULD level)
  • If the capability is not negotiated, the behavior is implementation-defined; servers may give * its special meaning regardless, or may implement the traditional meaning

emersion added a commit to emersion/soju that referenced this pull request Aug 3, 2023
emersion added a commit to emersion/soju that referenced this pull request Aug 3, 2023
The IRCv3 spec is stalled, so let's just ship a vendored extension
for now.

References: ircv3/ircv3-specifications#514
@emersion
Copy link
Copy Markdown
Contributor

emersion commented Aug 3, 2023

Now shipped as a vendored soju ext: https://git.sr.ht/~emersion/soju/commit/c36bb342fb13604996214951bfec477abfa38843

Now replaced with the draft spec!

Copy link
Copy Markdown
Contributor

@delthas delthas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Copy Markdown

@jesopo jesopo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this functionality isn't super important to me, but it seems to be to others and i have no objections to it. lgtm

@jwheare jwheare merged commit 6f3eca0 into ircv3:master Aug 3, 2023
@emersion
Copy link
Copy Markdown
Contributor

emersion commented Aug 3, 2023

Thanks a lot!

@awfulcooking
Copy link
Copy Markdown

That USER bitmask in rfc2812, tho :)

@sadiepowell
Copy link
Copy Markdown
Contributor

As a minor (dont let this block anything) bikeshed before this is ratified: given that AWAY * can be sent after registration might there be a more appropriate capability name for this than pre-away? e.g. generic-away, extended-away, etc.

wongweiwei pushed a commit to forkgitss/emersion-goguma that referenced this pull request Jun 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants