我试图用我们的后端提供的URI设置PHOTO vCard属性,根据xep-0054,
<!-- Photograph property. Value is either a BASE64 encoded
binary value or a URI to the external content. -->
<!ELEMENT PHOTO ((TYPE, BINVAL) | EXTVAL)>
我使用ejabberdctl
与mod_admin_extra
扩展。
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
但似乎不起作用,我在pidgin &Psy(值正确保存在数据库中)
我正在运行Archlinux, Pidgin 2.10.6 (libpurple 2.10.6) &ejabberd 2.1.11
我在https://github.com/processone/ejabberd/issues/47上问过,大多数流行的客户端不支持EXTVAL
xep-0054与xep-0153相矛盾,xep-0153说
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.