Ejabberd vCard:URI图像不起作用

时间:2013-01-07 20:25:56

标签: xmpp ejabberd pidgin

我正在尝试使用我们后端提供的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&amp; psy(值正确保存在数据库中)

我正在运行Archlinux,Pidgin 2.10.6(libpurple 2.10.6)&amp; ejabberd 2.1.11

1 个答案:

答案 0 :(得分:1)

我问https://github.com/processone/ejabberd/issues/47,大多数热门客户端不支持EXTVAL

xep-0054与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.