Project

General

Profile

How does a user know it has other resources online concurrently?

Matthew M
Added over 4 years ago

We have a customized XMPP client connecting to Tigase. I wonder if there is any relatively reliable way for this client to know that the same user is currently logging on with other resources?

In theory, each resource should send presence stanzas to all the buddies, including the resource of same user (from another client). However, I not sure if checking this presence from "myself" is reliable or not? For example, if the same user gets offline from another client, without sending any presence unavailable stanza, will Tigase automatically generates a presence unavailable stanza to the user's other online resources?

Basically, is such presence of the "myself" as reliable as the online status of "my buddies" in roster?

This would be a very useful security feature for a client to know if the account is currently used in other places or not.


Replies (1)

Avatar?id=6023&size=32x32

Added by Artur Hefczyc TigaseTeam over 4 years ago

In theory, each resource should send presence stanzas to all the buddies, including the resource of same user (from another client). However, I not sure if checking this presence from "myself" is reliable or not?

Yes, it is reliable.

For example, if the same user gets offline from another client, without sending any presence unavailable stanza, will Tigase automatically generates a presence unavailable stanza to the user's other online resources?

Yes, Tigase (and actually any XMPP server must do this according to the spec) does send unavailable presence on behalf of the client, even if the client does not send unavailable presence itself.

Basically, is such presence of the "myself" as reliable as the online status of "my buddies" in roster?

In practice it is even more reliable than presence of roster buddies.

    (1-1/1)