Skip to content
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

Open
2 tasks
valeriansaliou opened this issue Jun 17, 2022 · 4 comments
Open
2 tasks

Sidebar: Current user states #44

valeriansaliou opened this issue Jun 17, 2022 · 4 comments
Labels
feature New feature to implement
Milestone

Comments

@valeriansaliou
Copy link
Member

valeriansaliou commented Jun 17, 2022

  • Show logged-in user avatar

    • Description: Use User Avatar over PubSub/PEP (the server might not be compatible), do not use vcard-temp with avatars over vcard at all since it's been deprecated for 10+ years even if still widely used by XMPP clients.
    • XEPs:
  • Show logged-in user presence

@valeriansaliou valeriansaliou added this to the MVP milestone Jun 17, 2022
@valeriansaliou valeriansaliou added enhancement Improvement request feature New feature to implement and removed enhancement Improvement request feature New feature to implement labels Jun 17, 2022
@nesium
Copy link
Contributor

nesium commented Jun 27, 2022

Subscribe to the presence for the local user resource

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 show and or status properties.

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?

@valeriansaliou
Copy link
Member Author

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).

@nesium
Copy link
Contributor

nesium commented Jun 27, 2022

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.

@nesium
Copy link
Contributor

nesium commented Jun 27, 2022

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature to implement
Projects
Status: Todo
Development

No branches or pull requests

2 participants