0

根据xep-0054,我正在尝试使用后端提供的 URI 设置 PHOTO vCard 属性,

<!-- 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

4

1 回答 1

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.
于 2013-01-15T12:28:32.077 回答