diff options
| -rw-r--r-- | html.c | 15 |
1 files changed, 7 insertions, 8 deletions
| @@ -298,17 +298,16 @@ d_char *build_mentions(snac *snac, char *msg) | |||
| 298 | href && strcmp(href, snac->actor) != 0 && name) { | 298 | href && strcmp(href, snac->actor) != 0 && name) { |
| 299 | xs *l = xs_split(name, "@"); | 299 | xs *l = xs_split(name, "@"); |
| 300 | 300 | ||
| 301 | /* if it's a name without host, query the webfinger */ | 301 | /* is it a name without a host? */ |
| 302 | if (xs_list_len(l) < 3) { | 302 | if (xs_list_len(l) < 3) { |
| 303 | #if 0 | 303 | /* split the href and pick the host name LIKE AN ANIMAL */ |
| 304 | xs *actor = NULL; | 304 | /* would be better to query the webfinger but *won't do that* here */ |
| 305 | xs *user = NULL; | 305 | xs *l2 = xs_split(href, "/"); |
| 306 | 306 | ||
| 307 | if (valid_status(webfinger_request(href, &actor, &user))) { | 307 | if (xs_list_len(l2) >= 3) { |
| 308 | s = xs_str_cat(s, user); | 308 | xs *s1 = xs_fmt("%s@%s ", name, xs_list_get(l2, 2)); |
| 309 | s = xs_str_cat(s, " "); | 309 | s = xs_str_cat(s, s1); |
| 310 | } | 310 | } |
| 311 | #endif | ||
| 312 | } | 311 | } |
| 313 | else { | 312 | else { |
| 314 | s = xs_str_cat(s, name); | 313 | s = xs_str_cat(s, name); |