powered by Jive Software

Component presence

Greetings.

Having been pointed to the Whack project for a component I’‘m developing (and despite its beta-ish status, it’'s working great so far!), I am trying to figure out the best way to get all subscribed users to see an updated Presence status.

(I’‘m not yet certain just how this will be useful, but I’'m sure I can find something to do with it…)

Hopefully, even though it’'s not under active development, someone here can still help me figure this out…

Timothy Collett

Hey Timothy,

Your (external) component is responsible for handling presence subscriptions, presence probing and presence notifications. You can find detailed information about presence handling in this url=http://www.xmpp.org/specs/rfc3921.htmlXMPP spec[/url]. In a nutshell, your component will need to:

  1. when it gets a presence of type subscribe[/i] it will need to answer a subscribed[/i] (if the subscriber can subscribe to the component presence or any entity hosted by the component) or reply with unsubscribed[/i] if the subscription request is rejected. When the subscription request is accepted the component will need to keep a list of the users that are subscribed to the component presence (or any entity hosted by the component.

  2. when it gets a presence of type probe[/i] it will need to return a presence of type available[/i] if the component is available or unavailable[/i] when not available.

  3. when it gets a presence of type unsubscribe[/i] the component will need to remove the subscriber from the list of subscribed users and return an unsubscribed[/i] presence.

  4. when the component becomes online it will need to send an available[/i] presence to the list of subscribed users and when it goes offline it will need to send an unavailable[/i] presence to the subscribers.

Hope that helps.

Regards,

– Gato