Make emoji better on the wire

This commit is contained in:
Andrew Godwin 2022-12-16 22:20:58 -07:00
parent 606c628343
commit d7ffb47fb2
2 changed files with 2 additions and 2 deletions

View file

@ -214,7 +214,7 @@ class Emoji(StatorModel):
"""
return {
"id": self.object_uri or f"https://{settings.MAIN_DOMAIN}/emoji/{self.pk}/",
"type": "Emoji",
"type": "toot:Emoji",
"name": self.shortcode,
"icon": {
"type": "Image",

View file

@ -679,7 +679,7 @@ class Post(StatorModel):
post.mentions.add(mention_identity)
elif tag["type"].lower() == "hashtag":
post.hashtags.append(tag["name"].lower().lstrip("#"))
elif tag["type"].lower() == "toot:emoji":
elif tag["type"].lower() in ["toot:emoji", "emoji"]:
emoji = Emoji.by_ap_tag(post.author.domain, tag, create=True)
post.emojis.add(emoji)
else: