Skip to content
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

emoji support for slack integration #1887

Open
psifertex opened this issue Mar 9, 2021 · 8 comments
Open

emoji support for slack integration #1887

psifertex opened this issue Mar 9, 2021 · 8 comments

Comments

@psifertex
Copy link

@psifertex psifertex commented Mar 9, 2021

Is your enhancement request related to a problem? Please describe.
Currently when sending emoji via slack to a web-user, the emoji will come through with the slack text name, such as :frowning:

This is true even if the slack user pastes a native emoji and doesn't use the slack picker.

Interestingly, emoji coming the other way work just fine.

Describe the solution you'd like
I'd like the emoji to be shown as the visual emoji.

Describe alternatives you've considered
Only alternate I can think of is implementing this feature myself. Might take a look at the source and see. :-)

Additional context
Screen Shot 2021-03-09 at 5 17 56 PM

@pranavrajs
Copy link
Member

@pranavrajs pranavrajs commented Mar 10, 2021

@psifertex Are you aware of any standard by which we can transform it to emoji? It is not defined here https://unicode.org/emoji/charts/full-emoji-list.html

@psifertex
Copy link
Author

@psifertex psifertex commented Mar 10, 2021

Yup, they publish it here: https://github.com/iamcal/emoji-data

Here's a write up on someone else doing the same thing: https://aaronparecki.com/2017/02/05/8/day-47-slack-emoji

@psifertex
Copy link
Author

@psifertex psifertex commented Mar 10, 2021

Specifically, the "short_name" field of that data source will match all of the emoji that slack uses.

@psifertex
Copy link
Author

@psifertex psifertex commented Mar 12, 2021

I've found a bunch of other libraries that make this trivial, for example:

https://github.com/jrobertson/emoji2020

I don't know ruby but it /looks/ like adding that library and replacing: https://github.com/chatwoot/chatwoot/blob/develop/lib/integrations/slack/incoming_message_builder.rb#L86

With:

      content: Emoji2020.new(params[:event][:text]).to_s,

should basically solve this with a one line change!

@psifertex
Copy link
Author

@psifertex psifertex commented Mar 12, 2021

Now that I think about it some more, it might actually be better to render as an html image which would require something slightly more complicated such as using the first link I pasted above and having the images available in a directory. Still relatively straight forward and would be much less susceptible to font issues on various websites.

@sojan-official
Copy link
Member

@sojan-official sojan-official commented Mar 13, 2021

@psifertex Thanks for providing all that info. it's super helpful. We might not be able to get to this for the 1.14. release. But we will try to take this up for our subsequent one.

@sojan-official sojan-official added this to the v1.15.0 milestone Mar 13, 2021
@psifertex
Copy link
Author

@psifertex psifertex commented Mar 13, 2021

No worries, thanks for the update. Let me know if I can help with anything else. If I get some more time I might take a look at trying some of the libraries out and submitting a PR but it would probably take more time to figure out the deployment/setup process than actually writing the code. 🤣

@sojan-official
Copy link
Member

@sojan-official sojan-official commented Mar 14, 2021

@psifertex In case you decide to give it a try, this should help you set up the local installation. https://www.chatwoot.com/docs/installation-guide-docker

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants