Ejabberd vCard: изображение URI не работает

Я пытаюсь установить атрибут PHOTO vCard с URI, предоставленным нашим бэкэндом, в соответствии с 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

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.
Другие вопросы по тегам