Reaction lexicon

Helloo! With few Bluesky clients implementing Bluemoji, there has been conversation around emoji reactions on posts. I feel like standardizing here or having some discussion around it might be worth it. This topic has been touched on before on GitHub, but has been lost during the move to Tangled, so more reasons to restart it.

Here’s my rough vision as a conversation starter:

{
  "lexicon": 1,
  "id": "community.lexicon.interaction.reaction",
  "defs": {
    "main": {
      "type": "record",
      "key": "tid",
      "record": {
        "type": "object",
        "required": [
          "createdAt",
          "subject",
          "value"
        ],
        "properties": {
          "createdAt": {
            "type": "string",
            "format": "datetime"
          },
          "subject": {
            "type": "ref",
            "ref": "com.atproto.repo.strongRef"
          },
          "value": {
            "type": "union",
            "refs": [
              "#unicodeEmoji"
            ]
          }
        }
      }
    },
    "unicodeEmoji": {
      "type": "object",
      "required": [
        "value"
      ],
      "properties": {
        "value": {
          "type": "string",
          "minGraphemes": 1,
          "maxGraphemes": 1
        }
      }
    }
  }
}

Most important parts to me is that the value of the reaction is an open union to allow different emoji lexicons and leave it up to consumers if they accept them or not. I don’t think strongRef is good idea here, since for example the emoji lexicon I’m working on right now expects to be edited and conveys immutable data inside the rkey, which is just a emoji’s blob CID.
Also I feel like including some standardized way to represent the Unicode emojis makes sense, be it within this lexicon or a separate definition. Other way I could see it represented is inside the record itself, which could also act as a fallback.

Mainly starting this topic so people have a place for discussion. I’m not sure if I’ll be able to steward this, if there’s a consensus for standardization under here, but hopefully somebody else will be able to pick it up.

3 Likes

This looks good to me! I have threaded comments in my app for book clubs and I was wondering how to implement something like emoji reactions. I think I’ll take a crack at integrating this. I like the idea of an open union; I might consider (for my use case) making a limited palette of emoji reactions (similar to how GitHub restricts the emojis you can react with).

Glad you’re booting it back up! I’m hoping to use something like this in tandem with the results of Drafting a Threads lexicon so my book club’s conversation can have reactions as another communication signal.

2 Likes

I’m generally in favor of this. A while back there was a discussion that lead to the creation of “ community.lexicon.interaction.like”. If I recall correctly, the winning and majority opinion was that having strong individual NSIDs made it easier to index and sift through specific types of reactions. If your app only supports “likes” then you just cared about a single NSID and consuming those records in isolation was a little easier. On the other hand, it means that support a variety of reactions meant a growing spread of lexicon schemas.

I think we need to offer a string value in addition to a Unicode-based emoji type. There aren’t emojis for everything and I can’t imagine most applications use emoji as enums this way.

Personally I’m in favor of a general reaction type of lexicon. For me it raises a few questions:

If the value can be anything, what prevents this capability from being used for other purposes? Could I use this for arbitrary labeling or tagging?

What is the relationship between an individual value or a collection of values? If my app supports “like”, “heart”, “laugh”, and “ghost” is their guidance on the values? Should I publish my own lexicon schema definitions to use “com.example.reaction#like”?

Is there guidance on multiple reactions records? Given they are just TID records, it would be easy for an app to unintentionally (or maybe intentionally?) allow repeat or stacking reactions. Idk how I feel about an app building in a feature that intentionally results in people slamming hundreds or more of a reaction record vs having a quantity field or something.

Can things other than another record have a reaction? Can I star or like a https url? Using a strong ref here is pretty limiting.

1 Like

I was also thinking about this. It does seem a bit too flexible, but I don’t know of any better solution that wouldn’t restrict bringing in other reaction representations. I have some hope that the lexicons name and some documentation will funnel people towards the proper usage.

I think this would generally be treated the same way likes are, with maybe latest/oldest being counted only to deduplicate it, if there are multiple in a repo. There could maybe be an optional count field, but still somewhat unsure about it. Only example of a situation I can think of where it would be a big problem would maybe be, if an app has something similar to the TikTok/YouTube stream reaction button, that you can spam for it to immediately appear on the screen, but not sure if you would even want to do it through records.

Good point. Right now it’s defined the same way as for example community.lexicon.interaction.like, but since we are still discussing we could probably loosen this up in some way and maybe do the same for future lexicons too. Not really sure about how. Could be another union, but we would need a def that can represent a normal web URL.

Was coming from this from direction of using a value that is for example a reference to a Bluemoji, my lexicon or just a Unicode emoji, but for ones that are basically tokens, I feel like it would most likely require bringing your own lexicon. Multiple services would allow different reactions, I could maybe see them just use Unicode one and filter to the ones allowed, or like you mentioned use tokens. Not a lexicon expert, so unsure if we can standardize on anything like this while allowing services to extend it with additional values.
Found this example, where Tangled uses Unicode emojis as an enum: https://tangled.org/tangled.org/core/blob/38a811659f4eacfa1e805de1b621b0a22abcd19b/lexicons/org/tangled/feed/reaction.json, also it’s very similar to what we have here already, but of course more restrictive.

1 Like

This feels like a good idea; opens the door for things like “sticker” reactions, tbh.

I think I want this behavior; a bit similar to Slack’s reacji or GitHub’s reaction. For example, with this implemented by my agent; this is what it looks like (state flicker is lack of an opportunistic update):

Screencast From 2026-11-16 12-33-35

This is an interesting question. I like the strongRef for indexing purposes but opening it up things beyond an at:// URI allows for a bit of a different class of reaction (but also allows for cross-protocol/-content support, like for example; reacting to a YouTube video).