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

Federate custom emoji (outbound) #791

Merged
merged 2 commits into from
Sep 2, 2022

Conversation

blackle
Copy link
Contributor

@blackle blackle commented Sep 1, 2022

only the outgoing statuses for now. also adds a test that reads the full status from the DB and then serializes it, so we can compare the "tags" field (just using the raw test suite status doesn't have those fields populated)

I ran gofmt on the internaltoas.go file which is why there are more changes than just my code..

caveat: for some reason, gif emoji don't federate to some mastodon servers, even though the AP objects look basically identical (though we're missing the "updated" field in the emoji object, but static emoji still works in spite of that...)

@tsmethurst
Copy link
Contributor

i saw your post about this and replied here: https://ondergrond.org/@dumpsterqueer/108922590917081621

just so it's here as well: I think it's because vanilla Mastodon has a size limit of 50kb for emojis, and those animated ones (or at least the one I checked) are bigger :(

@tsmethurst
Copy link
Contributor

To be as AP spec compliant as possible, we should also add an endpoint to the s2s API to serve the AP representations of emojis. For example, if you do (random example):

curl -H 'accept: application/activity+json' https://mstdn.social/emojis/42450

you get back:

{
  "@context": [
    "https://www.w3.org/ns/activitystreams",
    {
      "toot": "http://joinmastodon.org/ns#",
      "Emoji": "toot:Emoji",
      "focalPoint": {
        "@container": "@list",
        "@id": "toot:focalPoint"
      }
    }
  ],
  "id": "https://mstdn.social/emojis/42450",
  "type": "Emoji",
  "name": ":blobcatnight:",
  "updated": "2020-06-13T18:33:25Z",
  "icon": {
    "type": "Image",
    "mediaType": "image/png",
    "url": "https://media.mstdn.social/custom_emojis/images/000/042/450/original/b9c906626b96a378.png"
  }
}

This doesn't have to be done in this PR necessarily, but we should do it before we cut a release including this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants