Closed emersion closed 10 months ago
maybe pre-reg user metadata could have a generalised solution
I support this idea.
If I had to spec something, I'd add an ext to allow clients to send AWAY before connection registration is complete.
This would overwrite the currently set away message, right? That seems undesirable, since the reattaching client may not have access to the "correct" away message.
I like the design of causal.agency/passive
for this.
I like the idea of being able to simply send AWAY pre-registration.
AS for the issue of it causing a change to away message for reattaching, perhaps the solution there is to provide a means for the server (be it IRCd or bouncer) to notify the reattaching client of the existing away message in a similar way to away-notify when the client has supplied a pre-reg away message, and then ignore the supplied message keeping the existing one, and then only updating it if the client sends another AWAY after registration.
This would overwrite the currently set away message, right? That seems undesirable, since the reattaching client may not have access to the "correct" away message.
It depends. If the server allows multiple clients to connect for the same user (e.g. ergo, or a bouncer), then the server cannot just use the latest AWAY
command sent by the client to update the user away state. If I don't use my laptop for 1h, but am still active on my workstation, I don't want to be marked as away. So the server needs to aggregate the state from all clients, and use that to update the effective user AWAY
status. If a single client is connected, the server may use that AWAY
message. If multiple clients are connected, the AWAY
message from a client should not override another client's.
All of this is assuming that clients send AWAY automatically when the user isn't active. Is this reasonable?
I like the design of causal.agency/passive for this.
causal.agency/passive has a drawback: once the client has enabled the cap, they can't switch back to unaway. The connection is permanently marked as away. This causes issues on mobile devices, where the away status needs to be cleared when the app is bring to foreground after a background synchronization.
If a single client is connected, the server may use that AWAY message. If multiple clients are connected, the AWAY message from a client should not override another client's.
It's not clear to me that these are the correct semantics. It sounds like you're suggesting that the first-set away message should take precedence? That seems like it could result in it being difficult or impossible to change the away message (if you set it from a long-running client that you temporarily don't have direct access to).
Ergo (typically) does aggregation but the last-set message wins, not the first-set.
causal.agency/passive has a drawback: once the client has enabled the cap, they can't switch back to unaway.
We could add a C2S command to cover this, right? PASSIVE OFF
or something?
It sounds like you're suggesting that the first-set away message should take precedence?
No, I'm trying to say that once multiple clients are involved, there's no reliable way for the server to pick the "correct" AWAY message. Maybe the long-running process has bad connectivity and reconnects. Maybe the long-running process is in a cron job and periodically connects/disconnects (much like goguma). In these cases last-set doesn't work well.
It would be nice to allow clients to make the difference between "AWAY message is explicitly set by the user" and "AWAY message is default/auto". A bit like realnames. Maybe an empty AWAY message (not sure they're widely supported?) or a special string?
We could add a C2S command to cover this, right? PASSIVE OFF or something?
This sounds like re-inventing AWAY again.
This sounds like re-inventing AWAY again.
Well, it wouldn't alter the away message. That's the point.
Maybe I'm missing something but I don't understand what is gained here by using AWAY for this, when:
The goal is at best peripheral to the traditional functionality of AWAY
My goal is exactly the same as AWAY.
There is no savings in spec complexity
Clients need to learn about a new command which does the same thing but not exactly. PASSIVE would result in AWAY messages broadcast to other users. What if a client uses both PASSIVE and AWAY? Which one wins?
Using AWAY immediately entangles this spec with the unclear semantics of multi-client AWAY (I agree with your argument that there is no one right answer there --- but that seems like a great argument for not using AWAY)
That's fine -- the client doesn't need to know about what the server decides. The client only needs to report enough information for the server to make the correct decision.
PASSIVE would result in AWAY messages broadcast to other users.
There's some ambiguity here between the AWAY
command (which conveys both away-ness and un-away-ness) and "away message" (the human-readable string conveying why the user is away). The semantics I'm imagining for PASSIVE is that it never sets or broadcasts a new away message:
PASSIVE ON
, pre-registration, cannot change the publicly visible away state. If the client was considered away before, it's still away; if it was considered un-away before, it's still un-away.PASSIVE OFF
may result in the client becoming un-away, hence clearing the publicly away state; so this does broadcast an AWAY
command, but not an away message.If this is specified using AWAY it seems like there are two possibilities:
What if a client uses both PASSIVE and AWAY? Which one wins?
When would there be a conflict here? (But also, if it's out of scope to specify "who wins" in the context of multi-client away, it seems like we shouldn't specify this either. I have a picture in my mind of how PASSIVE and AWAY should interact --- with PASSIVE enabled, the client session is simply "not counted" for presence purposes, and any explicit AWAY message that was sent is temporarily ignored --- but it doesn't seem like something we would write into the spec.)
PASSIVE ON, pre-registration, cannot change the publicly visible away state
What if a client sends PASSIVE ON
post-registration? This would switch the state from un-away to away.
When would there be a conflict here?
So the user is counted as away if either PASSIVE ON
or the AWAY
message is set?
What if a client sends PASSIVE ON post-registration? This would switch the state from un-away to away.
This should probably be rejected or disallowed:
QUIT
AWAY
(but this workflow is peripheral/deprecated for the use cases we're interested in; passive connections are primarily relevant in contexts where the server supports history and persistent presence). So the user is counted as away if either PASSIVE ON or the AWAY message is set?
More or less (modulo questions about multi-client aggregation). If they went through connection registration with PASSIVE ON
, it's as if that connection didn't exist at all.
What if a client sends PASSIVE ON post-registration? This would switch the state from un-away to away.
This should probably be rejected or disallowed
That doesn't work for mobile:
It seems sound, in theory, to allow PASSIVE ON post-registration and treat it as equivalent to QUIT for presence purposes. So it would be capable of changing the publicly visible away state, but only in ways that already exist.
This has gotten very complicated. Proposed quick and dirty alternative: an informational CAP that allows AWAY pre-registration, but recommends that clients and servers SHOULD treat AWAY *
as meaning "the user is not present, for unknown reasons". (This seems relatively backwards compatible. The worst case is that some legacy client ends up displaying *
to a human as the away message --- we've all seen worse.)
Sounds good to me. Any reason why the cap only recommends *
to be treated as "no reason", instead of requiring it?
Ah, I suppose the issue is with clients which receive the AWAY *
broadcast, not with servers.
I think MUSTs associated with AWAY *
would pose backwards compatibility issues, since this form exists and already has semantics under RFC1459. SHOULD seems like the right balance...
draft/pre-away
has been merged.
Use cases:
Prior art:
causal.agency/passive
, see https://git.causal.agency/pounce/about/pounce.1#ExtensionsIf I had to spec something, I'd add an ext to allow clients to send
AWAY
before connection registration is complete.