CustomEmojis

Allows users to send and receive custom emojis.

This adds a set of custom emoji images to the emoji picker, the emoji autocompleter, and emoji reactions.

Every emoji name must start and end with a colon, for example :lol:.

Make sure you always specify a consistent, backward-compatible set of custom emojis. If an existing message contains a custom emoji that is not specified in customEmojis here, then the emoji cannot be displayed and the textual name will be displayed instead (including colons).

If you want to allow an emoji to be displayed if it's used in existing data, but not let users select it in new messages or reactions, set the hidden option to true for that emoji.

Example

1{
2 ":lol:": { url: "https://example.com/images/emoji-lol.svg" },
3 ":roomba-cat:": { url: "https://example.com/images/roomba-cat.gif" },
4 ":alert:": { url: "https://example.com/images/alert.gif", hidden: true },
5}

Properties

FieldTypeDescription
[key: string]CustomEmojiDefinitionA set of custom emoji images

Type Definitions

CustomEmojiDefinition

Defines a custom emoji.

Properties

FieldTypeDescription
urlstringImage file URL

Must be a fully-qualified URL of an image file, such as an SVG, GIF or PNG. The image must be square (same width and height) and is always scaled down to the size of an emoji.
hiddenbooleanHides this emoji from the emoji picker and autocompleter

Hidden emojis can't be sent in new messages, or used in new emoji reactions, but they still display properly in existing messages and reactions. This lets you safely remove previously used custom emoji from the chat UI.

Used by