Send out emoji tags for identities
This commit is contained in:
parent
9779f867bf
commit
1670c92269
|
@ -489,6 +489,8 @@ class Identity(StatorModel):
|
||||||
}
|
}
|
||||||
|
|
||||||
def to_ap(self):
|
def to_ap(self):
|
||||||
|
from activities.models import Emoji
|
||||||
|
|
||||||
response = {
|
response = {
|
||||||
"id": self.actor_uri,
|
"id": self.actor_uri,
|
||||||
"type": self.actor_type.title(),
|
"type": self.actor_type.title(),
|
||||||
|
@ -533,6 +535,14 @@ class Identity(StatorModel):
|
||||||
}
|
}
|
||||||
for item in self.metadata
|
for item in self.metadata
|
||||||
]
|
]
|
||||||
|
# Emoji
|
||||||
|
emojis = Emoji.emojis_from_content(
|
||||||
|
(self.name or "") + " " + (self.summary or ""), None
|
||||||
|
)
|
||||||
|
if emojis:
|
||||||
|
response["tag"] = []
|
||||||
|
for emoji in emojis:
|
||||||
|
response["tag"].append(emoji.to_ap_tag())
|
||||||
return response
|
return response
|
||||||
|
|
||||||
def to_ap_tag(self):
|
def to_ap_tag(self):
|
||||||
|
|
Loading…
Reference in New Issue