felixrieseberg / slack-archive

Generate static HTML archives of Slack workspaces
243 stars 33 forks source link

Reaction emojis missing from generated HTML #19

Closed elonen closed 1 year ago

elonen commented 2 years ago

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.

felixrieseberg commented 1 year ago

This is now done!