summaryrefslogtreecommitdiff
path: root/data.c
diff options
context:
space:
mode:
authordefault <nobody@localhost>2023-05-29 11:07:38 +0200
committerdefault <nobody@localhost>2023-05-29 11:07:38 +0200
commit765936244888f8d5f1644b0178cc6dc70597166b (patch)
treec7766c1c55748329f0cc4deda0e528bda6845d0c /data.c
parent05ac2a062dc3f01837c511a2d7e2051cda15e44a (diff)
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)
}
+void enqueue_close_question(snac *user, const char *id, int end_secs)
+/* enqueues the closing of a question */
+{
+ xs *qmsg = _new_qmsg("close_question", id, 0);
+ xs *ntid = tid(end_secs);
+ xs *fn = xs_fmt("%s/queue/%s.json", user->basedir, ntid);
+
+ qmsg = xs_dict_set(qmsg, "ntid", ntid);
+
+ qmsg = _enqueue_put(fn, qmsg);
+
+ snac_debug(user, 0, xs_fmt("enqueue_close_question %s", id));
+}
+
+
xs_list *user_queue(snac *snac)
/* returns a list with filenames that can be dequeued */
{