diff options
| author | 2025-08-23 11:04:11 +0200 | |
|---|---|---|
| committer | 2025-08-23 11:04:11 +0200 | |
| commit | e50a6ba146def4accc36d9d6cc4be43e4a758711 (patch) | |
| tree | 7490d0b360b2d85e514ea9816075e661e3f98b7b /data.c | |
| parent | Merge pull request 'updates holen' (#10) from grunfink/snac2:master into master (diff) | |
| parent | Added 'collect_replies' info in the about screen. (diff) | |
| download | snac2-e50a6ba146def4accc36d9d6cc4be43e4a758711.tar.gz snac2-e50a6ba146def4accc36d9d6cc4be43e4a758711.tar.xz snac2-e50a6ba146def4accc36d9d6cc4be43e4a758711.zip | |
Merge pull request 'master' (#11) from grunfink/snac2:master into master
Reviewed-on: https://codeberg.org/zen/snac2/pulls/11
Diffstat (limited to 'data.c')
| -rw-r--r-- | data.c | 13 |
1 files changed, 13 insertions, 0 deletions
| @@ -3576,6 +3576,19 @@ void enqueue_notify_webhook(snac *user, const xs_dict *noti, int retries) | |||
| 3576 | } | 3576 | } |
| 3577 | 3577 | ||
| 3578 | 3578 | ||
| 3579 | void enqueue_collect_replies(snac *user, const char *post) | ||
| 3580 | /* enqueues a collect replies request */ | ||
| 3581 | { | ||
| 3582 | xs *qmsg = _new_qmsg("collect_replies", post, 0); | ||
| 3583 | const char *ntid = xs_dict_get(qmsg, "ntid"); | ||
| 3584 | xs *fn = xs_fmt("%s/queue/%s.json", user->basedir, ntid); | ||
| 3585 | |||
| 3586 | qmsg = _enqueue_put(fn, qmsg); | ||
| 3587 | |||
| 3588 | snac_debug(user, 1, xs_fmt("enqueue_collect_replies %s", post)); | ||
| 3589 | } | ||
| 3590 | |||
| 3591 | |||
| 3579 | int was_question_voted(snac *user, const char *id) | 3592 | int was_question_voted(snac *user, const char *id) |
| 3580 | /* returns true if the user voted in this poll */ | 3593 | /* returns true if the user voted in this poll */ |
| 3581 | { | 3594 | { |