Make emoji better on the wire
This commit is contained in:
parent
606c628343
commit
d7ffb47fb2
|
@ -214,7 +214,7 @@ class Emoji(StatorModel):
|
||||||
"""
|
"""
|
||||||
return {
|
return {
|
||||||
"id": self.object_uri or f"https://{settings.MAIN_DOMAIN}/emoji/{self.pk}/",
|
"id": self.object_uri or f"https://{settings.MAIN_DOMAIN}/emoji/{self.pk}/",
|
||||||
"type": "Emoji",
|
"type": "toot:Emoji",
|
||||||
"name": self.shortcode,
|
"name": self.shortcode,
|
||||||
"icon": {
|
"icon": {
|
||||||
"type": "Image",
|
"type": "Image",
|
||||||
|
|
|
@ -679,7 +679,7 @@ class Post(StatorModel):
|
||||||
post.mentions.add(mention_identity)
|
post.mentions.add(mention_identity)
|
||||||
elif tag["type"].lower() == "hashtag":
|
elif tag["type"].lower() == "hashtag":
|
||||||
post.hashtags.append(tag["name"].lower().lstrip("#"))
|
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)
|
emoji = Emoji.by_ap_tag(post.author.domain, tag, create=True)
|
||||||
post.emojis.add(emoji)
|
post.emojis.add(emoji)
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in New Issue