LemmyNet / lemmy

🐀 A link aggregator and forum for the fediverse
https://join-lemmy.org
GNU Affero General Public License v3.0
13.25k stars 879 forks source link

I would like to suggest the possibility of federating emojis so that, if they want and are federated, instances can allow their users to use an other instence's emoji #4376

Open ExotiqueMatter opened 9 months ago

ExotiqueMatter commented 9 months ago

Requirements

Is your proposal related to a problem?

Hello,

I am a lemmygrad user. We are federated with hexbear since a few month and I love all the emojis they have. But there isn't any systematic way to use their emojis, the best way I found is to save every new emoji I've come across on my desktop, or search for the emoji's name, find a post/comment that has it and copy paste it in whatever I'm typing, but this is very inconvinient, and require to know the name of the emojis or come across it by chance.

Describe the solution you'd like.

I would like to suggest to implement a way to share emojis between instances, such that users can use emojis from instances they are not a part of but federated with.

Of cource, this should include a way for instances to decide which other inctances are allowed to use their emojis and which other instance's emoji they want to allow their own users to use.

Describe alternatives you've considered.

As I have mentioned, I currently "use hexbear's emoji" by saving those I see in a folder on my desktop os looking for a post/comment that has the emoji I want and copy-pasting them an a markdown link.

This is the only way I have found to do it, it works but is very ineficient, klunky and inconveniant, plus this only allow me to use emojis I know since I have no way to access a list of hexbear's emojis.

Additional context

No response

Nutomic commented 9 months ago

Emojis are currently federated simply as markdown images, so there is no way to distinguish emojis from other embedded images.

Mastodon federates custom emojis by putting only the label in the text (eg :myemoji:), and then adding a tag with the url:

"tag": [
  {
    "id": "https://bonn.social/emojis/2761",
    "type": "Emoji",
    "name": ":bonndigital:",
    "updated": "2023-04-22T07:51:50Z",
    "icon": {
    "type": "Image",
      "mediaType": "image/png",
      "url": "https://bonn.social/system/custom_emojis/images/000/002/761/original/bonndigital.png"
    }
}
],

(fetched using curl -H 'Accept: application/activity+json' https://bonn.social/@vilbi/99667462347887767 | jq)

We could implement the same for Lemmy, but it would take some effort and would also be a breaking change.

The-RedWizard commented 3 months ago

Would federation of emoji's be something we are interested in? I imagine it would require some level of control to block some or all emoji from a given instance, separate from the process of defederating from that instance. I imagine there might be some instances might not be excited about suddenly having a PPB emoji (but they would have poor taste).

I wonder if instead a separate "syncing" system could be implemented, where instances can subscribe to a given instance's emoji and sync them to their instance. This could utilize existing APIs for importing emoji. The task of syncing could be done on demand or via a scheduled interval (every 12 hours, every 24 hours etc). In addition to the existing data for an emoji, an origin property could be added that is the name of the instance they were imported from. This could be used to further group emoji in the interface, provide a means of purging the totality of an instance's emoji from your instance, be used to ensure you're only importing the native emoji to that instance, and maybe used to prevent modification of keywords and names locally, so the data remains in parity with the host instance.

It wouldn't be a breaking change, would be opt-in for instances who wish to share emoji, and wouldn't require them to be part of the federation process. Then again, I am very unfamiliar with the code required for federation, so maybe this is just me reinventing the wheel.