Renamed validated_metadata to validated_links.

This commit is contained in:
default 2024-02-15 10:33:33 +01:00
parent f5d6223bbf
commit b4208bfec9
2 changed files with 8 additions and 8 deletions

8
html.c
View File

@ -767,9 +767,9 @@ static xs_html *html_user_body(snac *user, int local)
xs_str *k;
xs_str *v;
xs_dict *val_metadata = xs_dict_get(user->config, "validated_metadata");
if (xs_is_null(val_metadata))
val_metadata = xs_stock_dict;
xs_dict *val_links = xs_dict_get(user->config, "validated_links");
if (xs_is_null(val_links))
val_links = xs_stock_dict;
xs_html *snac_metadata = xs_html_tag("div",
xs_html_attr("class", "snac-metadata"));
@ -779,7 +779,7 @@ static xs_html *html_user_body(snac *user, int local)
if (xs_startswith(v, "https:/" "/")) {
/* is this link validated? */
char *val_date = xs_dict_get(val_metadata, v);
char *val_date = xs_dict_get(val_links, v);
if (!xs_is_null(val_date) && *val_date) {
value = xs_html_container(

View File

@ -1134,15 +1134,15 @@ int mastoapi_get_handler(const xs_dict *req, const char *q_path,
xs_str *k;
xs_str *v;
xs_dict *val_metadata = xs_dict_get(snac1.config, "validated_metadata");
if (xs_is_null(val_metadata))
val_metadata = xs_stock_dict;
xs_dict *val_links = xs_dict_get(snac1.config, "validated_links");
if (xs_is_null(val_links))
val_links = xs_stock_dict;
while (xs_dict_iter(&metadata, &k, &v)) {
char *val_date = NULL;
if (xs_startswith(v, "https:/" "/"))
val_date = xs_dict_get(val_metadata, v);
val_date = xs_dict_get(val_links, v);
xs *d = xs_dict_new();