[Standards] Support for stickers (custom emojis)

Philipp Hörist philipp at hoerist.com
Thu Oct 17 10:14:53 UTC 2019

Just make a HTTP HEAD request, look how big the content is then start to

This is not a problem specific of stickers, you have that problem always
when you want to download data, potentially the data can always be big.

or you add an attribute size, and trust the sending client.


Am Do., 17. Okt. 2019 um 12:10 Uhr schrieb JC Brand <lists at opkode.com>:

> Hello
> I'm currently working on adding support for non-unicode emojis to
> Converse.js.
> Currently, users can't upload their own images to be used for custom
> emojis,
> mostly because Converse is a thin client with no backend support for it.
> So to add custom emojis, the web host needs to edit a emojis.json file
> to add new entries with URLs pointing to the actual images.
> Concerning compatibility with other clients, I've discussed it with edhelas
> and he told me he uses XEP-0231 BOB for sending stickers.
> There are a few reasons why I'm not keen on using BOB:
> - BOB depends on XHTML-IM which is deprecated. Converse.js doesn't support
> it
>   and I'm reluctant to add support just for this.
> - BOB mentions that binary data should be smaller than 1KB. Not sure how
>   relevant that still is, but it discourages me from sending larger
> amounts.
> - The sending client needs to maintain a cache of all sent stickers.
> - AFAICT, when receiving an uncached BOB message via MAM and the sending
> client
>   is offline, then you can't get the image data.
> Instead, I propose that we use XEP-0372 references to indicate that a
> particular shortname (e.g. :dancingpanda:) should be replaced with an
> image.
> For example:
>     <message type="chat" from="them at chat.org" to="me at chat.org"
>         <body>I feel like dancing! :dancingpanda:</body>
>         <reference xmlnx="urn:xmpp:reference:0"
>                 begin="21"
>                 end="35"
>                 type="data"
>                 uri="https://images.com/dancingpanda"/>
>     </message>
> I'm not sure whether "type" should be "data", seems a bit too generic for
> me,
> perhaps it could be something else?
> Some criticisms of this approach from edhelas:
> - HTTP images can be sent to a webchat client served over HTTPS
> - There's no size limit, so users can send links to very large stickers
> Concerning the first criticism, a client can choose to not render HTTP
> images inline and instead make the shortname a link which opens the image
> in a
> new tab. Not ideal, but a compromise for the privacy and security
> conscious.
> For the second I don't have a good answer.
> That said, I currently still prefer my suggestion to using BOB. I'd be
> interested to hear your feedback and suggestions.
> Regards
> JC
> _______________________________________________
> Standards mailing list
> Info: https://mail.jabber.org/mailman/listinfo/standards
> Unsubscribe: Standards-unsubscribe at xmpp.org
> _______________________________________________
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.jabber.org/pipermail/standards/attachments/20191017/73ceb927/attachment-0001.html>

More information about the Standards mailing list