-
Schimon
Good day. How is it possible to know whether a JID is sharing its subscription presence without adding it to roster?
-
theTedd
If you receive presence stanzas then they're sharing presence, otherwise you can assume not (until/unless you receive a presence stanza)
-
jonas’
indeed, you should always receive a presence stanza
-
jonas’
even if it is type='error' (because of an s2s failure) or type='unavailable' (because there's no available resource)
-
jonas’
the problem is, of course, that the type='error' may be delayed for quite a while, while your server is trying to connect to the remote server
-
jonas’
(minutes even)
-
jonas’
(or longer in case of more funny issues)
-
jonas’
so there's not a bullet-proof way to know, but if you haven't received a presence stanza after five minutes or so after sending available presence, you can fairly certainly assume that you don't have a subscription.
-
Schimon
theTedd. and jonas’. I am aware of these "events" as they are in Slixmpp, but I want t oactively probe for presence, so that I would be able to operate a bot without a roster.✎ -
Schimon
theTedd. and jonas’. I am aware of these "events" as they are in Slixmpp, but I want t oactively probe for presence, so that I would be able to operate a bot without a roster, if at all possible. ✏
-
theTedd
There is either roster subscription or directed presence. In the case of directed presence, you only know that someone is willing to send you their presence when they have already sent it. If they are online and willing, then they should already have sent it.