felixrieseberg/slack-archive

Reaction emojis missing from generated HTML

Closed this issue · 1 comments

Reaction emojis aren't currently shown in the HTML export.
While perhaps less informational than the actual message text, they do often have semantic value beyond simple mood indication - e.g. as voting and status tracking.

Stored JSON data contains the data:

        "reactions": [
          {
            "name": "sunglasses",
            "users": [
              "U80P62ZN5"
            ],
            "count": 1
          }
        ]

Unlike message text, this doesn't readily specify a unicode character, just a "shortcode". I did some digging, and this looks like a good source to get a mapping for the standard ones: https://github.com/iamcal/emoji-data

Slack allows users to add custom shortcodes, too, so the mapping code should probably leave those as text (e.g. <code class="custom-reaction">:backtothechoppah:</code>).

List of users for a given reaction could perhaps be put in HTML SPAN's tooltip.

This is now done!