summaryrefslogtreecommitdiff
path: root/mastoapi.c
diff options
context:
space:
mode:
Diffstat (limited to 'mastoapi.c')
-rw-r--r--mastoapi.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/mastoapi.c b/mastoapi.c
index 0a0c3d6..fd89341 100644
--- a/mastoapi.c
+++ b/mastoapi.c
@@ -624,12 +624,15 @@ xs_dict *mastoapi_account(const xs_dict *actor)
624 624
625 /* dict of validated links */ 625 /* dict of validated links */
626 xs_dict *val_links = NULL; 626 xs_dict *val_links = NULL;
627 xs_dict *metadata = xs_stock_dict;
627 snac user = {0}; 628 snac user = {0};
628 629
629 if (xs_startswith(id, srv_baseurl)) { 630 if (xs_startswith(id, srv_baseurl)) {
630 /* if it's a local user, open it and pick its validated links */ 631 /* if it's a local user, open it and pick its validated links */
631 if (user_open(&user, prefu)) 632 if (user_open(&user, prefu)) {
632 val_links = user.links; 633 val_links = user.links;
634 metadata = xs_dict_get_def(user.config, "metadata", xs_stock_dict);
635 }
633 } 636 }
634 637
635 if (xs_is_null(val_links)) 638 if (xs_is_null(val_links))
@@ -644,8 +647,10 @@ xs_dict *mastoapi_account(const xs_dict *actor)
644 !xs_is_null(value) && strcmp(type, "PropertyValue") == 0) { 647 !xs_is_null(value) && strcmp(type, "PropertyValue") == 0) {
645 xs *val_date = NULL; 648 xs *val_date = NULL;
646 649
647 if (xs_startswith(value, "https:/" "/")) { 650 char *url = xs_dict_get(metadata, name);
648 xs_number *verified_time = xs_dict_get(val_links, value); 651
652 if (xs_startswith(url, "https:/" "/")) {
653 xs_number *verified_time = xs_dict_get(val_links, url);
649 if (xs_type(verified_time) == XSTYPE_NUMBER) { 654 if (xs_type(verified_time) == XSTYPE_NUMBER) {
650 time_t t = xs_number_get(verified_time); 655 time_t t = xs_number_get(verified_time);
651 656