-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sidebar: Current user states #44
Comments
I'm not sure if I'm understanding that correctly. From what I've read so far When connecting the client sends the initial presence to the server which signals availability. Either in that presence stanza or later the client also has the option to include the In my understanding the presence as such is a local thing. The Prose app would save the last configured presence by the user and would send it to the server once it is reconnected. Am I missing something? |
It's even simpler. XMPP clients do not need to hold a persistent storage of presence states. The server does hold a runtime storage of all remote contact presences. When you (as a client) announce your first available presence, the server understands that it should (literally) flood you with the presence of all your online contacts. So you receive 1 presence stanza per online contact. Offline contacts would say silent in this case. Therefore, you can consider all contacts offline when the app boot (do not recover anything from the disk, it might be invalid and expired), and wait for your own server to re-announce all your contact presences (even remote ones, ie. those on another server). |
Thanks! That's clear so far. I was specifically referring to what you've described as "presence for the local user resource", so your own presence. Especially that you suggested that one needs to "subscribe" to it. But it's the client where the presence originates from so there's no point in subscribing to it, unless I'm missing something. As I've mentioned I do think that we should persist the user's presence setting. E.g. when the user sets themselves to 'away', after restarting the app should still have the same setting. |
Is that for multi-device use? And we'd say that the device that is connected first determines the presence. When another device (from the same account) comes later online it doesn't overwrite the current presence but inherits it instead? |
Show logged-in user avatar
Show logged-in user presence
The text was updated successfully, but these errors were encountered: