diff options
author | Andrew Godwin | 2022-12-16 22:20:58 -0700 |
---|---|---|
committer | Andrew Godwin | 2022-12-16 22:20:58 -0700 |
commit | d7ffb47fb2d973fd2d6eea09c57fd3620d6b6af1 (patch) | |
tree | 880d4c500f74df38cdf9f09030eee0e5a4727357 /activities/models | |
parent | 606c628343a05ea18f62670c417f06ba6f90712c (diff) | |
download | takahe-d7ffb47fb2d973fd2d6eea09c57fd3620d6b6af1.tar.gz takahe-d7ffb47fb2d973fd2d6eea09c57fd3620d6b6af1.tar.bz2 takahe-d7ffb47fb2d973fd2d6eea09c57fd3620d6b6af1.zip |
Make emoji better on the wire
Diffstat (limited to 'activities/models')
-rw-r--r-- | activities/models/emoji.py | 2 | ||||
-rw-r--r-- | activities/models/post.py | 2 |
2 files changed, 2 insertions, 2 deletions
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: |