summaryrefslogtreecommitdiff
path: root/data.c
diff options
context:
space:
mode:
authorGravatar grunfink2025-05-03 19:16:21 +0200
committerGravatar grunfink2025-05-03 19:16:21 +0200
commit605b60c06ea882cd61df7f2d834c02cce6dd254d (patch)
treec56a85ff869ce1d2db6e523f87c33023ea272146 /data.c
parentRevert adding links as attachments. (diff)
downloadsnac2-605b60c06ea882cd61df7f2d834c02cce6dd254d.tar.gz
snac2-605b60c06ea882cd61df7f2d834c02cce6dd254d.tar.xz
snac2-605b60c06ea882cd61df7f2d834c02cce6dd254d.zip
New function enqueue_webmention().
The q_msg is queued, but nothing is done yet.
Diffstat (limited to 'data.c')
-rw-r--r--data.c13
1 files changed, 13 insertions, 0 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{