diff options
| -rw-r--r-- | html.c | 7 | ||||
| -rw-r--r-- | httpd.c | 13 |
2 files changed, 13 insertions, 7 deletions
| @@ -3531,6 +3531,13 @@ xs_str *html_notifications(snac *user, int skip, int show) | |||
| 3531 | xs_html_text(L("Context")))), | 3531 | xs_html_text(L("Context")))), |
| 3532 | h); | 3532 | h); |
| 3533 | } | 3533 | } |
| 3534 | else | ||
| 3535 | xs_html_add(entry, | ||
| 3536 | xs_html_tag("p", | ||
| 3537 | xs_html_text(L("Location: ")), | ||
| 3538 | xs_html_tag("a", | ||
| 3539 | xs_html_attr("href", id), | ||
| 3540 | xs_html_text(id)))); | ||
| 3534 | } | 3541 | } |
| 3535 | 3542 | ||
| 3536 | if (strcmp(v, n_time) > 0) { | 3543 | if (strcmp(v, n_time) > 0) { |
| @@ -407,11 +407,6 @@ int server_post_handler(const xs_dict *req, const char *q_path, | |||
| 407 | return status; | 407 | return status; |
| 408 | } | 408 | } |
| 409 | 409 | ||
| 410 | if (!object_here(target)) { | ||
| 411 | srv_debug(0, xs_fmt("webmention-hook target %s not / no longer here", target)); | ||
| 412 | return status; | ||
| 413 | } | ||
| 414 | |||
| 415 | /* get the user */ | 410 | /* get the user */ |
| 416 | xs *s1 = xs_replace(target, srv_baseurl, ""); | 411 | xs *s1 = xs_replace(target, srv_baseurl, ""); |
| 417 | 412 | ||
| @@ -419,13 +414,17 @@ int server_post_handler(const xs_dict *req, const char *q_path, | |||
| 419 | const char *uid = xs_list_get(l1, 1); | 414 | const char *uid = xs_list_get(l1, 1); |
| 420 | snac user; | 415 | snac user; |
| 421 | 416 | ||
| 422 | if (!xs_is_string(uid) || !user_open(&user, uid)) | 417 | if (!xs_is_string(uid) || !user_open(&user, uid)) { |
| 418 | srv_debug(1, xs_fmt("webmention-hook cannot find user for %s", target)); | ||
| 423 | return status; | 419 | return status; |
| 420 | } | ||
| 424 | 421 | ||
| 425 | int r = xs_webmention_hook(source, target, USER_AGENT); | 422 | int r = xs_webmention_hook(source, target, USER_AGENT); |
| 426 | 423 | ||
| 427 | if (r > 0) | 424 | if (r > 0) { |
| 428 | notify_add(&user, "Webmention", NULL, source, target, xs_stock(XSTYPE_DICT)); | 425 | notify_add(&user, "Webmention", NULL, source, target, xs_stock(XSTYPE_DICT)); |
| 426 | timeline_touch(&user); | ||
| 427 | } | ||
| 429 | 428 | ||
| 430 | srv_log(xs_fmt("webmention-hook source=%s target=%s %d", source, target, r)); | 429 | srv_log(xs_fmt("webmention-hook source=%s target=%s %d", source, target, r)); |
| 431 | 430 | ||