From d7ffb47fb2d973fd2d6eea09c57fd3620d6b6af1 Mon Sep 17 00:00:00 2001 From: Andrew Godwin Date: Fri, 16 Dec 2022 22:20:58 -0700 Subject: Make emoji better on the wire --- activities/models/emoji.py | 2 +- activities/models/post.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'activities/models') diff --git a/activities/models/emoji.py b/activities/models/emoji.py index c310423..8af28e3 100644 --- a/activities/models/emoji.py +++ b/activities/models/emoji.py @@ -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", diff --git a/activities/models/post.py b/activities/models/post.py index 6847327..8a9aabb 100644 --- a/activities/models/post.py +++ b/activities/models/post.py @@ -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: -- cgit v1.2.3