diff options
| author | 2025-06-07 08:19:40 +0200 | |
|---|---|---|
| committer | 2025-06-07 08:19:40 +0200 | |
| commit | dfd246a0e9df31f315f1fd650c9b916195b2c9e4 (patch) | |
| tree | 28fe1cb69e38fc43fab3a4387590c58d0be46af3 /utils.c | |
| parent | Updated documentation. (diff) | |
| download | snac2-dfd246a0e9df31f315f1fd650c9b916195b2c9e4.tar.gz snac2-dfd246a0e9df31f315f1fd650c9b916195b2c9e4.tar.xz snac2-dfd246a0e9df31f315f1fd650c9b916195b2c9e4.zip | |
Always store resolved account handles as metadata, even if they weren't verified.
Diffstat (limited to 'utils.c')
| -rw-r--r-- | utils.c | 12 |
1 files changed, 8 insertions, 4 deletions
| @@ -497,6 +497,14 @@ void verify_links(snac *user) | |||
| 497 | if (valid_status(webfinger_request(v, &wfinger, NULL)) && xs_is_string(wfinger)) { | 497 | if (valid_status(webfinger_request(v, &wfinger, NULL)) && xs_is_string(wfinger)) { |
| 498 | ov = v; | 498 | ov = v; |
| 499 | v = wfinger; | 499 | v = wfinger; |
| 500 | |||
| 501 | /* store the alias */ | ||
| 502 | if (user->links == NULL) | ||
| 503 | user->links = xs_dict_new(); | ||
| 504 | |||
| 505 | user->links = xs_dict_set(user->links, ov, v); | ||
| 506 | |||
| 507 | changed++; | ||
| 500 | } | 508 | } |
| 501 | } | 509 | } |
| 502 | 510 | ||
| @@ -575,10 +583,6 @@ void verify_links(snac *user) | |||
| 575 | 583 | ||
| 576 | user->links = xs_dict_set(user->links, v, verified_time); | 584 | user->links = xs_dict_set(user->links, v, verified_time); |
| 577 | 585 | ||
| 578 | /* also add the original value if it was 'resolved' */ | ||
| 579 | if (xs_is_string(ov)) | ||
| 580 | user->links = xs_dict_set(user->links, ov, v); | ||
| 581 | |||
| 582 | vfied = 1; | 586 | vfied = 1; |
| 583 | } | 587 | } |
| 584 | else | 588 | else |