mirror of
https://codeberg.org/grunfink/snac2.git
synced 2024-11-10 03:50:38 +03:00
build_mentions() completes uids without host.
This commit is contained in:
parent
6807fecc73
commit
7f0063d5e1
15
html.c
15
html.c
@ -298,17 +298,16 @@ d_char *build_mentions(snac *snac, char *msg)
|
|||||||
href && strcmp(href, snac->actor) != 0 && name) {
|
href && strcmp(href, snac->actor) != 0 && name) {
|
||||||
xs *l = xs_split(name, "@");
|
xs *l = xs_split(name, "@");
|
||||||
|
|
||||||
/* if it's a name without host, query the webfinger */
|
/* is it a name without a host? */
|
||||||
if (xs_list_len(l) < 3) {
|
if (xs_list_len(l) < 3) {
|
||||||
#if 0
|
/* split the href and pick the host name LIKE AN ANIMAL */
|
||||||
xs *actor = NULL;
|
/* would be better to query the webfinger but *won't do that* here */
|
||||||
xs *user = NULL;
|
xs *l2 = xs_split(href, "/");
|
||||||
|
|
||||||
if (valid_status(webfinger_request(href, &actor, &user))) {
|
if (xs_list_len(l2) >= 3) {
|
||||||
s = xs_str_cat(s, user);
|
xs *s1 = xs_fmt("%s@%s ", name, xs_list_get(l2, 2));
|
||||||
s = xs_str_cat(s, " ");
|
s = xs_str_cat(s, s1);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
s = xs_str_cat(s, name);
|
s = xs_str_cat(s, name);
|
||||||
|
Loading…
Reference in New Issue
Block a user