From 605b60c06ea882cd61df7f2d834c02cce6dd254d Mon Sep 17 00:00:00 2001 From: grunfink Date: Sat, 3 May 2025 19:16:21 +0200 Subject: New function enqueue_webmention(). The q_msg is queued, but nothing is done yet. --- data.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'data.c') 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) } +void enqueue_webmention(const xs_dict *msg) +/* enqueues a webmention for the post */ +{ + xs *qmsg = _new_qmsg("webmention", msg, 0); + const char *ntid = xs_dict_get(qmsg, "ntid"); + xs *fn = xs_fmt("%s/queue/%s.json", srv_basedir, ntid); + + qmsg = _enqueue_put(fn, qmsg); + + srv_debug(1, xs_fmt("enqueue_webmention")); +} + + int was_question_voted(snac *user, const char *id) /* returns true if the user voted in this poll */ { -- cgit v1.2.3