diff options
Diffstat (limited to 'html.c')
| -rw-r--r-- | html.c | 16 |
1 files changed, 13 insertions, 3 deletions
| @@ -779,11 +779,21 @@ static xs_html *html_user_body(snac *user, int local) | |||
| 779 | 779 | ||
| 780 | if (xs_startswith(v, "https:/" "/")) { | 780 | if (xs_startswith(v, "https:/" "/")) { |
| 781 | /* is this link validated? */ | 781 | /* is this link validated? */ |
| 782 | char *val_date = xs_dict_get(val_links, v); | 782 | xs *verified_link = NULL; |
| 783 | xs_number *val_time = xs_dict_get(val_links, v); | ||
| 783 | 784 | ||
| 784 | if (!xs_is_null(val_date) && *val_date) { | 785 | if (xs_type(val_time) == XSTYPE_NUMBER) { |
| 786 | time_t t = xs_number_get(val_time); | ||
| 787 | |||
| 788 | if (t > 0) { | ||
| 789 | xs *s1 = xs_str_utctime(t, ISO_DATE_SPEC); | ||
| 790 | verified_link = xs_fmt("%s (%s)", L("verified link"), s1); | ||
| 791 | } | ||
| 792 | } | ||
| 793 | |||
| 794 | if (!xs_is_null(verified_link)) { | ||
| 785 | value = xs_html_tag("span", | 795 | value = xs_html_tag("span", |
| 786 | xs_html_attr("title", L("verified link")), | 796 | xs_html_attr("title", verified_link), |
| 787 | xs_html_raw("✔ "), | 797 | xs_html_raw("✔ "), |
| 788 | xs_html_tag("a", | 798 | xs_html_tag("a", |
| 789 | xs_html_attr("href", v), | 799 | xs_html_attr("href", v), |