kopia lustrzana https://github.com/jointakahe/takahe
Make emoji better on the wire
rodzic
606c628343
commit
d7ffb47fb2
|
@ -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",
|
||||
|
|
|
@ -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:
|
||||
|
|
Ładowanie…
Reference in New Issue