- (void)xmppStream:(XMPPStream *)sender didReceivePresence:(XMPPPresence *)presence
My issue is I am not getting "status" keyword along with the presence. It looks something like this:
<?xml version="1.0" encoding="UTF-8"?> <presence xmlns="jabber:client" to="ha...@xyz.com" from="ha...@xyz.com/652873306-tigase-174"> <x xmlns="vcard-temp:x:update"> <photo /> </x> <c xmlns="http://jabber.org/protocol/caps" hash="sha-1" node="https://github.com/robbiehanson/XMPPFramework" ver="VyOFcFX6+YNmKssVXSBKGFP0BS4=" /> </presence>
According to stackoverflow post: http://stackoverflow.com/questions/20145107/how-to-filter-the-xmpp-presence-that-is-received-in-ios
Presence packet should look like this:
// <presence xmlns="jabber:client"
// id="Jothb-6"
// from="sen...@domain.com/resource"
// to="rece...@domain.com">
// <status>Online</status>
// <show>presence message</show>
// <priority>1</priority>
// </presence>
The 'type' attribute of a presence stanza is OPTIONAL. A presence stanza that does not possess a 'type' attribute is used to signal to the server that the sender is online and available for communication. If included, the 'type' attribute specifies a lack of availability, a request to manage a subscription to another entity's presence, a request for another entity's current presence, or an error related to a previously-sent presence stanza. If included, the 'type' attribute MUST have one of the following values:
For detailed information regarding presence semantics and the subscription model used in the context of XMPP-based instant messaging and presence applications, refer to Exchanging Presence Information and Managing Subscriptions.
The OPTIONAL <show/> element contains non-human-readable XML character data that specifies the particular availability status of an entity or specific resource. A presence stanza MUST NOT contain more than one <show/> element. The <show/> element MUST NOT possess any attributes. If provided, the XML character data value MUST be one of the following (additional availability types could be defined through a properly-namespaced child element of the presence stanza):
If no <show/> element is provided, the entity is assumed to be online and available.
The OPTIONAL <status/> element contains XML character data specifying a natural-language description of availability status. It is normally used in conjunction with the show element to provide a detailed description of an availability state (e.g., "In a meeting"). The <status/> element MUST NOT possess any attributes, with the exception of the 'xml:lang' attribute. Multiple instances of the <status/> element MAY be included but only if each instance possesses an 'xml:lang' attribute with a distinct language value.
--
You received this message because you are subscribed to the Google Groups "XMPPFramework" group.
To unsubscribe from this group and stop receiving emails from it, send an email to xmppframewor...@googlegroups.com.
To post to this group, send email to xmppfr...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/xmppframework/5b4ddbfe-260a-4083-be4d-7520edf89e0f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.