From fa688a5a7322728378234e71b5230ffd37e720d5 Mon Sep 17 00:00:00 2001 From: Andrew Godwin Date: Wed, 11 Jan 2023 22:04:03 -0700 Subject: [PATCH] Fixed #383: Render links in API metadata values --- users/models/identity.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/users/models/identity.py b/users/models/identity.py index 6ea45ec..ada35d7 100644 --- a/users/models/identity.py +++ b/users/models/identity.py @@ -835,6 +835,7 @@ class Identity(StatorModel): emojis = Emoji.emojis_from_content( f"{self.name} {self.summary} {metadata_value_text}", self.domain ) + renderer = ContentRenderer(local=False) return { "id": self.pk, "username": self.username or "", @@ -849,7 +850,11 @@ class Identity(StatorModel): "locked": False, "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 ] if self.metadata