aboutsummaryrefslogtreecommitdiff
path: root/utils.c
diff options
context:
space:
mode:
authorgrunfink <grunfink@comam.es>2025-06-07 08:19:40 +0200
committergrunfink <grunfink@comam.es>2025-06-07 08:19:40 +0200
commitdfd246a0e9df31f315f1fd650c9b916195b2c9e4 (patch)
tree28fe1cb69e38fc43fab3a4387590c58d0be46af3 /utils.c
parent6e26dc7e2a045168d13711b646257471cc830b17 (diff)
Always store resolved account handles as metadata, even if they weren't verified.
Diffstat (limited to 'utils.c')
-rw-r--r--utils.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/utils.c b/utils.c
index d8c55dc..7adbce2 100644
--- a/utils.c
+++ b/utils.c
@@ -497,6 +497,14 @@ void verify_links(snac *user)
if (valid_status(webfinger_request(v, &wfinger, NULL)) && xs_is_string(wfinger)) {
ov = v;
v = wfinger;
+
+ /* store the alias */
+ if (user->links == NULL)
+ user->links = xs_dict_new();
+
+ user->links = xs_dict_set(user->links, ov, v);
+
+ changed++;
}
}
@@ -575,10 +583,6 @@ void verify_links(snac *user)
user->links = xs_dict_set(user->links, v, verified_time);
- /* also add the original value if it was 'resolved' */
- if (xs_is_string(ov))
- user->links = xs_dict_set(user->links, ov, v);
-
vfied = 1;
}
else