Src: /public/custom-emoji/squared_key.png That way, if an emoji shortcode is removed, the content of the status will not change.įor bios, usernames, and other situations, shortcodes may be stored in the database verbatim (to make later editing of these fields easier), but must be converted to emoji prior to federation.Ī simple implementation of this might be to include an emoji.yml file in the root directory, which Mastodon then reads to perform the functions above. This replacement must take place for all local objects, and must not take place with regard to objects received from other instances (ie, through federation).įor statuses, this replacement should happen prior to the statuses being stored in the database. The first thing which needs to be accomplished regarding custom emoji is allowing Mastodon instances to define their own emoji shortcodes.įor an instance to support this feature, emoji shortcodes must be replaced with their corresponding Unicode characters in statuses, bios, and usernames. I've broken the plan for implementing this feature into multiple steps, which should be completed in order. If a custom emoji gains widespread adoption across instances, they could additionally pave the way for eventual Unicode inclusion.
#MASTODON LINUX EMOJI CODE#Regarding the latter questions, we have decided to rely on the following methods for expanding the Unicode emoji set:Įmoji 5.0 expressly allows conforming implementations to support a single code point outside of the basic emoji set for display, input, or editing as an emoji.įor example, U+26E4 ⛤ PENTAGRAM is an existing Unicode code point.Ī Mastodon instance may elect to display this character as an emoji, instead of as text. ![]() This (a) greatly eases implementation, and also (b) helps to prevent abuse (unsavory emojis, emojis stolen without credit, etc).įor the second question, shortcodes remain a convenient means of emoji insertion, and it shouldn't be too difficult to expand this functionality for our own purposes.
0 Comments
Leave a Reply. |
AuthorKay ArchivesCategories |