Hi,
On Tue, 2024-08-27 at 14:18 +0000, Tedd Sterr wrote:
Would anything break if a 'joined' attribute
were added? Then we
could gradually migrate to using that, and autojoin regains its
actual purpose.
Well, let's play the scenario where we had `autojoin` and `joined`
independent. What is the expected behavior of clients?
A=`autojoin`, J=`joined`
Client connects:
None -> Do not join room
A -> Join room (`autojoin` is true) and change to A+J (because we
joined now)
J, A+J -> Join room (`joined` is true)
Client is joined and receives update:
None -> Leave (`joined` is false)
A -> Leave (`joined` is false) and then join on next connect
(`autojoin` is true)
J, A+J -> Stay in Room
Client is not joined and receives update:
None -> Do not join room
A -> ? Either join (and change to A+J) or ignore and join on next
connect (`autojoin` is true)
J, A+J -> Join
As you can see, the interpretation of the `joined` attribute is that it
behaves exactly as the `autojoin` attribute is defined in the updated
XPE-0402.
The only difference would be that `autojoin` could be interpret as only
go in effect after reconnecting. `autojoin`, when true, would
eventually be copied into `joined` and does not matter once `joined` is
set. This seems pretty useless IMO. Why don't we just keep `autojoin`
if it has effectively the same meaning as soon as the first client
reconnects (which may be a few minutes later, if you have an unstable
connection)?
Marvin