I am developing an application in which I want to update an avatar image. I follow the XEP-0153 recommendations for updating the avatar image, and I built an NSXMLElement corresponding to the following code in XEP-0153 , and sent this element through XMPPStream .
<iq from=' juliet@capulet.com ' type='set' id='vc1'> <vCard xmlns='vcard-temp'> <PHOTO> <TYPE>image/jpeg</TYPE> <BINVAL> Base64-encoded-avatar-file-here! </BINVAL> </PHOTO> </vCard> </iq>
The server responds to the following error:
<iq xmlns="jabber:client" type="error" id="vc1" to=" vvreddy50@gmail.com /83557F96"> <vCard xmlns="vcard-temp"> <photo> <type>image/jpeg</type> <binval>Base64-encoded-avatar-file-here</binval> </photo> </vCard> <error code="500" type="wait"> <internal-server-error xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"> </internal-server-error> </error> </iq>
Instead of <iq to=' juliet@capulet.com ' type='result' id='vc1'/>
Please, can you post a code or link related to updating the avatar image? Thanks in advance.
source share