summaryrefslogtreecommitdiff
path: root/httpd.c
diff options
context:
space:
mode:
Diffstat (limited to 'httpd.c')
-rw-r--r--httpd.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/httpd.c b/httpd.c
index 9216bdc..8f2ef4d 100644
--- a/httpd.c
+++ b/httpd.c
@@ -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