summaryrefslogtreecommitdiff
path: root/data.c
diff options
context:
space:
mode:
authorGravatar default2023-05-29 11:07:38 +0200
committerGravatar default2023-05-29 11:07:38 +0200
commit765936244888f8d5f1644b0178cc6dc70597166b (patch)
treec7766c1c55748329f0cc4deda0e528bda6845d0c /data.c
parentKeep the original question order after updates. (diff)
downloadsnac2-765936244888f8d5f1644b0178cc6dc70597166b.tar.gz
snac2-765936244888f8d5f1644b0178cc6dc70597166b.tar.xz
snac2-765936244888f8d5f1644b0178cc6dc70597166b.zip
Enqueue a close_question user q_item.
Diffstat (limited to 'data.c')
-rw-r--r--data.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/data.c b/data.c
index 303b534..d7b0ff6 100644
--- a/data.c
+++ b/data.c
@@ -1920,6 +1920,21 @@ void enqueue_message(snac *snac, xs_dict *msg)
1920} 1920}
1921 1921
1922 1922
1923void enqueue_close_question(snac *user, const char *id, int end_secs)
1924/* enqueues the closing of a question */
1925{
1926 xs *qmsg = _new_qmsg("close_question", id, 0);
1927 xs *ntid = tid(end_secs);
1928 xs *fn = xs_fmt("%s/queue/%s.json", user->basedir, ntid);
1929
1930 qmsg = xs_dict_set(qmsg, "ntid", ntid);
1931
1932 qmsg = _enqueue_put(fn, qmsg);
1933
1934 snac_debug(user, 0, xs_fmt("enqueue_close_question %s", id));
1935}
1936
1937
1923xs_list *user_queue(snac *snac) 1938xs_list *user_queue(snac *snac)
1924/* returns a list with filenames that can be dequeued */ 1939/* returns a list with filenames that can be dequeued */
1925{ 1940{