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

Support fedibird emoji reaction #3029

Open
shuuji3 opened this issue Oct 29, 2024 · 2 comments
Open

Support fedibird emoji reaction #3029

shuuji3 opened this issue Oct 29, 2024 · 2 comments
Assignees
Labels
c: feature Request for new feature c: fediverse Related to non-Mastodon servers

Comments

@shuuji3
Copy link
Member

shuuji3 commented Oct 29, 2024

Some Mastodon-fork or other Fediverse servers support Emoji reactions but Elk cannot show any of them now.

Although the full support for non-Mastodon feature from Masto.js is still under discussion (neet/masto.js#939), Phanpy already partially supports it (read-only for now). And the required data is already in the API response. The following example is the response used in Elk from Mastodon-fork server (fedibird.com):

{
    ...
    "url": "https://fedibird.com/@shuuji3/113389571124564820",
    ...
    "emojis": [
        {
            "shortcode": "fedibird_role_01",
            "url": "https://files.mastodon.social/cache/custom_emojis/images/000/742/119/original/2fa7c5a158722c9d.png",
            "static_url": "https://files.mastodon.social/cache/custom_emojis/images/000/742/119/static/2fa7c5a158722c9d.png",
            "visible_in_picker": true
        }
    ],
    ...
}

https://mastodon.social/api/v1/statuses/113389571139053725

I think this feature has been there for a long time and is enough stable, so Elk also can support some of them at least as a read-only feature like Phanpy. This will reduce the hurdle of using Elk for users in such servers.

Examples

Original post in Fedibird (Mastodon-fork): https://fedibird.com/@shuuji3/113389571124564820

On Phanpy

screenshot of phanpy showing the post
https://phanpy.social/#/fedibird.com/s/113389571124564820

On Elk

screenshot of elk showing the post
https://main.elk.zone/fedibird.com/@shuuji3/113389571124564820

Other

Useful information on reaction API: cheeaun/phanpy#598 (comment)

@shuuji3 shuuji3 added c: feature Request for new feature c: fediverse Related to non-Mastodon servers labels Oct 29, 2024
@shuuji3 shuuji3 self-assigned this Oct 29, 2024
@shuuji3
Copy link
Member Author

shuuji3 commented Oct 29, 2024

There was a misunderstanding. The above emojis fields only include the emoji information used within the body text, not emoji reactions. So additional data needs to be fetched from another place.

@shuuji3
Copy link
Member Author

shuuji3 commented Oct 29, 2024

The remoji_reactions property can be by fetching the status from the original fedibird server. In this case, it's https://fedibird.com/api/v1/statuses/113389571124564820

{
  "id": "113389571124564820",
  ...
  "url": "https://fedibird.com/@shuuji3/113389571124564820",
  ...
  "emoji_reactions": [
    {
      "name": "fedibird_role_01",
      "count": 1,
      "url": "https://s3.fedibird.com/custom_emojis/images/000/601/889/original/d89c09a74e1ba7b2.png",
      "static_url": "https://s3.fedibird.com/custom_emojis/images/000/601/889/static/d89c09a74e1ba7b2.webp",
      "domain": null,
      "width": 681,
      "height": 111,
      "account_ids": [
        "113389564950996781"
      ],
      "me": true
    },
    {
      "name": "star_02",
      "count": 1,
      "url": "https://s3.fedibird.com/custom_emojis/images/000/601/951/original/1774562bc3456006.gif",
      "static_url": "https://s3.fedibird.com/custom_emojis/images/000/601/951/static/1774562bc3456006.webp",
      "domain": null,
      "width": 672,
      "height": 97,
      "account_ids": [
        "113389564950996781"
      ],
      "me": true
    }
  ],
  "emoji_reactions_count": 2,
  ...
}

@shuuji3 shuuji3 changed the title Support emoji reaction Support fedibird emoji reaction Oct 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c: feature Request for new feature c: fediverse Related to non-Mastodon servers
Projects
None yet
Development

No branches or pull requests

1 participant