mirror of
https://github.com/jointakahe/takahe.git
synced 2024-11-29 10:40:59 +00:00
Fixed #383: Render links in API metadata values
This commit is contained in:
parent
ae74d65157
commit
fa688a5a73
1 changed files with 6 additions and 1 deletions
|
@ -835,6 +835,7 @@ class Identity(StatorModel):
|
||||||
emojis = Emoji.emojis_from_content(
|
emojis = Emoji.emojis_from_content(
|
||||||
f"{self.name} {self.summary} {metadata_value_text}", self.domain
|
f"{self.name} {self.summary} {metadata_value_text}", self.domain
|
||||||
)
|
)
|
||||||
|
renderer = ContentRenderer(local=False)
|
||||||
return {
|
return {
|
||||||
"id": self.pk,
|
"id": self.pk,
|
||||||
"username": self.username or "",
|
"username": self.username or "",
|
||||||
|
@ -849,7 +850,11 @@ class Identity(StatorModel):
|
||||||
"locked": False,
|
"locked": False,
|
||||||
"fields": (
|
"fields": (
|
||||||
[
|
[
|
||||||
{"name": m["name"], "value": m["value"], "verified_at": None}
|
{
|
||||||
|
"name": m["name"],
|
||||||
|
"value": renderer.render_identity_data(m["value"], self),
|
||||||
|
"verified_at": None,
|
||||||
|
}
|
||||||
for m in self.metadata
|
for m in self.metadata
|
||||||
]
|
]
|
||||||
if self.metadata
|
if self.metadata
|
||||||
|
|
Loading…
Reference in a new issue