11-30-2016 07:36 AM
As described on this page:
If you subscribe to the presence of a person who is not on your contact list (also called temporary presence subscription), the subscription expires after 68 minutes. After the subscription expires, you must re-subscribe to the person’s presence in order to continue to receive presence updates.
I'm confused about two things:
1. How can I find out if a user is in my contact list from javascript if I have his/her IM address?
2. How can I be notified when a subscription has expired?
It seems unclear how to accomplish these things by reading the documentation, what am I missing?
01-25-2017 11:20 AM
jabberwerx.EntitySet.entity(jid, node)
Fetch method for any known-existing jabberwerx.Entity object. If the object does not already exist, `undefined` is returned.
That should tell you if the contact is in your EntitySet. If you don't get 'undefined' as a result, that means that contact is in your roster. The "node" is optional, and you don't need to provide it.
I don't know about subscriptions expiring, though. I'll see what I can find about that.
02-15-2017 11:53 AM
I can't find any API that notifies you want a subscription has expired.
Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: