I'm using the Smack API for Java to connect to ejabberd and gtalk servers. I can connect and log in fine, but I want to make 1 minor modification.
How can I change the presence stanza of the logged in user?
For example, given the stanza:
<presence to="[email protected]/androidd5a3arer3"
from="[email protected]/Smack">
<status></status>
<priority>24</priority>
<show>away</show>
<c xmlns="http://jabber.org/protocol/caps"></c>
<x xmlns="vcard-temp:x:update">
<photo>asefe3a33e</photo>
</x>
</presence>
I'd like to append a new field like this before sending off the packet to someone else:
<presence to="[email protected]/androidd5a3arer3"
from="[email protected]/Smack">
<status></status>
<priority>24</priority>
<show>away</show>
<c xmlns="http://jabber.org/protocol/caps"></c>
<x xmlns="vcard-temp:x:update">
<photo>asefe3a33e</photo>
</x>
<NEW_FIELD> NEW STUFF HERE </NEW_FIELD>
</presence>
Any help would be appreciated.