mirror of
https://codeberg.org/grunfink/snac2.git
synced 2024-11-28 23:53:36 +00:00
Always return rel=me in msg_actor() links.
This commit is contained in:
parent
09d680e7dc
commit
f5d6223bbf
1 changed files with 1 additions and 10 deletions
|
@ -1221,10 +1221,6 @@ xs_dict *msg_actor(snac *snac)
|
||||||
xs_str *k;
|
xs_str *k;
|
||||||
xs_str *v;
|
xs_str *v;
|
||||||
|
|
||||||
xs_dict *val_metadata = xs_dict_get(snac->config, "validated_metadata");
|
|
||||||
if (xs_is_null(val_metadata))
|
|
||||||
val_metadata = xs_stock_dict;
|
|
||||||
|
|
||||||
while (xs_dict_iter(&metadata, &k, &v)) {
|
while (xs_dict_iter(&metadata, &k, &v)) {
|
||||||
xs *d = xs_dict_new();
|
xs *d = xs_dict_new();
|
||||||
|
|
||||||
|
@ -1232,13 +1228,8 @@ xs_dict *msg_actor(snac *snac)
|
||||||
xs *v2 = NULL;
|
xs *v2 = NULL;
|
||||||
|
|
||||||
if (xs_startswith(v, "https:")) {
|
if (xs_startswith(v, "https:")) {
|
||||||
char *val_date = xs_dict_get(val_metadata, v);
|
|
||||||
xs *t = encode_html(v);
|
xs *t = encode_html(v);
|
||||||
|
v2 = xs_fmt("<a href=\"%s\" rel=\"me\">%s</a>", t, t);
|
||||||
if (xs_type(val_date) == XSTYPE_STRING && *val_date)
|
|
||||||
v2 = xs_fmt("<a href=\"%s\" rel=\"me\">%s</a>", t, t);
|
|
||||||
else
|
|
||||||
v2 = xs_fmt("<a href=\"%s\">%s</a>", t, t);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
v2 = encode_html(v);
|
v2 = encode_html(v);
|
||||||
|
|
Loading…
Reference in a new issue