diff options
| author | 2025-05-03 19:16:21 +0200 | |
|---|---|---|
| committer | 2025-05-03 19:16:21 +0200 | |
| commit | 605b60c06ea882cd61df7f2d834c02cce6dd254d (patch) | |
| tree | c56a85ff869ce1d2db6e523f87c33023ea272146 /data.c | |
| parent | Revert adding links as attachments. (diff) | |
| download | snac2-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.c | 13 |
1 files changed, 13 insertions, 0 deletions
| @@ -3473,6 +3473,19 @@ void enqueue_actor_refresh(snac *user, const char *actor, int forward_secs) | |||
| 3473 | } | 3473 | } |
| 3474 | 3474 | ||
| 3475 | 3475 | ||
| 3476 | void 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 | |||
| 3476 | int was_question_voted(snac *user, const char *id) | 3489 | int 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 | { |