Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support custom aliasing :words: to an emoji/custom emoji #878

Closed
turt2live opened this issue Oct 16, 2018 · 10 comments
Closed

Support custom aliasing :words: to an emoji/custom emoji #878

turt2live opened this issue Oct 16, 2018 · 10 comments

Comments

@turt2live
Copy link
Member

No description provided.

@lampholder lampholder added the X-Needs-Info This issue is blocked awaiting information from the reporter label Oct 17, 2018
@turt2live
Copy link
Member Author

turt2live commented Oct 17, 2018

@lampholder The original request is that :+1: should magically do the right thing, but the suggestion was that :arbitary-string: should be custom mapped to an emoji (eg: :hello: to 💯).

@sam1919
Copy link

sam1919 commented Jan 29, 2019

If I may add a use case for this:

I want to see this for chat rooms.

Many bulletin boards have a special set of emoticons which are not covered by emojis. These often are animated GIFs, user write them in the middle of a sentence (or after it ;-). [I'm not talking about stickers.]

Riot can view inline images but AFAIK you need a long markdown phrase to do that, including the URL to the image. No single chat room user wants to write that every time so it would be great if aliases for text input were possible.

@DoubleCouponDay
Copy link

It wont happen unless you make the integration yourself

@lampholder lampholder changed the title Support custom aliasing :words: to an emoji Support custom aliasing :words: to an emoji/custom emoji Mar 12, 2019
@element-hq element-hq deleted a comment from Half-Shot Mar 12, 2019
@element-hq element-hq deleted a comment from Half-Shot Mar 12, 2019
@lampholder
Copy link
Member

Right, I've brutally reshaped this issue to address the :custom_words: -> emoji/custom emoji usecase.

The Halfshot diversion @turt2live summarised with:

I think @Half-Shot wants to take this to the next level and have :arbitrary-string: map to whatever the user wants (eg: :hello: to Hey there! Welcome to #community, how are you?)

can be created as a new issue if anyone feels keen, but know that if you do I'm going to class it as a P5 Feature request 😛

@lampholder lampholder added P2 and removed X-Needs-Info This issue is blocked awaiting information from the reporter labels Mar 12, 2019
@Half-Shot
Copy link
Member

P5 Feature request stuck_out_tongue

I always end up with features there :(

@imtbl
Copy link

imtbl commented Jan 25, 2020

+1 for this, custom emotes are always great to have.

I've implemented a very simple and hacky version that just replaces :<emote name>: with <img> tags for me and my friends. It also features autocompletion (with the default emoji autocompletion removed as we don't use them).

Here are the changes I made to get this working:

https://github.com/mserajnik/riot-web/commit/0f398ad38d203c0aa89834c5694ef1d8b2e1da62
https://github.com/mserajnik/matrix-react-sdk/commit/09c95e047070001a65d9a5a88f8f248f1b2f5f7a

To serve the emotes, I've created a small emote server application: https://github.com/mserajnik/emote-server

Disclaimer: I've made this to be used by me and my friends. We run a private Synapse server with federation turned off and trust each other. I'm not that familiar with React, so I'm not sure if my escapeHtml() helper function is enough to truly prevent possible XSS attacks or if other issues could arise from my changes. E.g., I'm pretty certain that you could somehow do XSS attacks using malicious emote names as they are not escaped at all.

Therefore this should merely serve as an example of how it could be done in terms of the general workings (having emote packs served or installable, users need the same packs to see the same emotes) and I do not recommend usage of this modified version of Riot or the React SDK (and the Apache License 2.0 applies, so I obviously provide no warranty if you do decide to use it).

@ghost
Copy link

ghost commented Mar 3, 2020

This is possible, although you need to hotpatch the emojibase-data dependency before building riot. Not a great solution but I doubt riot will provide an official way to do it

@rgpublic
Copy link

+1 from me. This would be so useful to have in the UI under the user's personal settings. Especially since the official emoji shortcuts are quite often really counter-intuitive. I keep typing ":dino:" over and over and am disappointed time and again, that there's no dinosaur. But, contrary to popular belief, they haven't suddenly become extinct but are alive & well under ":sauropod:". This is the secret part of Jurassic Park no one told you, right? ;-)

@grinapo
Copy link

grinapo commented Aug 3, 2021

Well under the recent change all emoji descriptions were changed (to some other system which can be surely justified and this is out of my scope now anyway), so people trying to access them by the old and known words fail; this make this issue pretty actual again.

What I imagine is that emjois can have undefined amount of aliases (and if it's matched within the string it may be simply a concatenated string of names) so people can use the old name, the new name, or whatever name scheme they prefer (or even use a shared name scheme from others).

For example I always look for "sad" and now it doesn't find any of the "frown" variants. (Funnily I would never use the word "frown" for a sad face, but that may be my lack of vocabulary.)

@Akselmo
Copy link

Akselmo commented Dec 19, 2022

Other clients like Cinny, Nheko, Fluffychat etc. support custom emojis. Is this planned for Element? Not sure if this is the correct issue since I didn't find anything else that mentions custom emojis.

@t3chguy t3chguy transferred this issue from element-hq/element-web Dec 20, 2022
@element-hq element-hq locked and limited conversation to collaborators Dec 20, 2022
@t3chguy t3chguy converted this issue into discussion #879 Dec 20, 2022

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Projects
None yet
Development

No branches or pull requests