summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--data.c13
-rw-r--r--html.c4
-rw-r--r--main.c1
-rw-r--r--snac.h1
4 files changed, 18 insertions, 1 deletions
diff --git a/data.c b/data.c
index 7d33f77..73332ef 100644
--- a/data.c
+++ b/data.c
@@ -3473,6 +3473,19 @@ void enqueue_actor_refresh(snac *user, const char *actor, int forward_secs)
3473} 3473}
3474 3474
3475 3475
3476void enqueue_webmention(const xs_dict *msg)
3477/* enqueues a webmention for the post */
3478{
3479 xs *qmsg = _new_qmsg("webmention", msg, 0);
3480 const char *ntid = xs_dict_get(qmsg, "ntid");
3481 xs *fn = xs_fmt("%s/queue/%s.json", srv_basedir, ntid);
3482
3483 qmsg = _enqueue_put(fn, qmsg);
3484
3485 srv_debug(1, xs_fmt("enqueue_webmention"));
3486}
3487
3488
3476int was_question_voted(snac *user, const char *id) 3489int was_question_voted(snac *user, const char *id)
3477/* returns true if the user voted in this poll */ 3490/* returns true if the user voted in this poll */
3478{ 3491{
diff --git a/html.c b/html.c
index 0652892..e114ea7 100644
--- a/html.c
+++ b/html.c
@@ -4488,8 +4488,10 @@ int html_post_handler(const xs_dict *req, const char *q_path,
4488 snac_log(&snac, xs_fmt("cannot get object '%s' for editing", edit_id)); 4488 snac_log(&snac, xs_fmt("cannot get object '%s' for editing", edit_id));
4489 } 4489 }
4490 4490
4491 if (c_msg != NULL) 4491 if (c_msg != NULL) {
4492 enqueue_message(&snac, c_msg); 4492 enqueue_message(&snac, c_msg);
4493 enqueue_webmention(msg);
4494 }
4493 4495
4494 history_del(&snac, "timeline.html_"); 4496 history_del(&snac, "timeline.html_");
4495 } 4497 }
diff --git a/main.c b/main.c
index a6fb6fd..80df2d0 100644
--- a/main.c
+++ b/main.c
@@ -830,6 +830,7 @@ int main(int argc, char *argv[])
830 } 830 }
831 831
832 enqueue_message(&snac, c_msg); 832 enqueue_message(&snac, c_msg);
833 enqueue_webmention(msg);
833 834
834 timeline_add(&snac, xs_dict_get(msg, "id"), msg); 835 timeline_add(&snac, xs_dict_get(msg, "id"), msg);
835 836
diff --git a/snac.h b/snac.h
index 06f9568..d9d0cfd 100644
--- a/snac.h
+++ b/snac.h
@@ -289,6 +289,7 @@ void enqueue_close_question(snac *user, const char *id, int end_secs);
289void enqueue_object_request(snac *user, const char *id, int forward_secs); 289void enqueue_object_request(snac *user, const char *id, int forward_secs);
290void enqueue_verify_links(snac *user); 290void enqueue_verify_links(snac *user);
291void enqueue_actor_refresh(snac *user, const char *actor, int forward_secs); 291void enqueue_actor_refresh(snac *user, const char *actor, int forward_secs);
292void enqueue_webmention(const xs_dict *msg);
292int was_question_voted(snac *user, const char *id); 293int was_question_voted(snac *user, const char *id);
293 294
294xs_list *user_queue(snac *snac); 295xs_list *user_queue(snac *snac);