문제

I'm trying to set the PHOTO vCard attribute with an URI provided by our backend, according to the xep-0054,

<!-- Photograph property. Value is either a BASE64 encoded
binary value or a URI to the external content. -->
<!ELEMENT PHOTO ((TYPE, BINVAL) | EXTVAL)>

I'm using ejabberdctl with the mod_admin_extra extension.

ejabberdctl set_vcard foo chat.myjabber.com PHOTO http://link_to_image.jpg
ejabberdctl set_vcard2 foo chat.myjabber.com PHOTO EXTVAL http://link_to_image.jpg

But doesn't seems to work, I see nothing in pidgin & psy (value is correctly saved in database)

I'm running Archlinux, Pidgin 2.10.6 (libpurple 2.10.6) & ejabberd 2.1.11

도움이 되었습니까?

해결책

I asked on https://github.com/processone/ejabberd/issues/47 and most of popular client doesn't support EXTVAL

xep-0054 is in contradiction of the xep-0153 that say

4.5 XML Syntax

The following rules apply to the XML syntax:

The <PHOTO/> element SHOULD contain a <BINVAL/> child whose XML character data is Base64-encoded data for the avatar image.

The <PHOTO/> element SHOULD NOT contain an <EXTVAL/> that points to a URI for the image file.

The <PHOTO/> element MUST NOT contain the avatar image itself.

The <PHOTO/> element SHOULD contain a <TYPE/> child whose XML character data specifies the content-type of the image data. The XML character data SHOULD be "image/gif", "image/jpeg", or "image/png".

The <PHOTO/> element MUST NOT possess a 'mime-type' attribute.
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top