mirror of
https://codeberg.org/grunfink/snac2.git
synced 2024-11-09 11:40:27 +03:00
Renamed validated_metadata to validated_links.
This commit is contained in:
parent
f5d6223bbf
commit
b4208bfec9
8
html.c
8
html.c
@ -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(
|
||||
|
@ -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();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user