diff options
| author | 2023-05-29 11:07:38 +0200 | |
|---|---|---|
| committer | 2023-05-29 11:07:38 +0200 | |
| commit | 765936244888f8d5f1644b0178cc6dc70597166b (patch) | |
| tree | c7766c1c55748329f0cc4deda0e528bda6845d0c /main.c | |
| parent | Keep the original question order after updates. (diff) | |
| download | snac2-765936244888f8d5f1644b0178cc6dc70597166b.tar.gz snac2-765936244888f8d5f1644b0178cc6dc70597166b.tar.xz snac2-765936244888f8d5f1644b0178cc6dc70597166b.zip | |
Enqueue a close_question user q_item.
Diffstat (limited to 'main.c')
| -rw-r--r-- | main.c | 4 |
1 files changed, 3 insertions, 1 deletions
| @@ -253,9 +253,10 @@ int main(int argc, char *argv[]) | |||
| 253 | } | 253 | } |
| 254 | 254 | ||
| 255 | if (strcmp(cmd, "question") == 0) { /** **/ | 255 | if (strcmp(cmd, "question") == 0) { /** **/ |
| 256 | int end_secs = 5 * 60; | ||
| 256 | xs *opts = xs_split(url, ";"); | 257 | xs *opts = xs_split(url, ";"); |
| 257 | 258 | ||
| 258 | xs *msg = msg_question(&snac, "Poll", opts, 0, 5 * 60); | 259 | xs *msg = msg_question(&snac, "Poll", opts, 0, end_secs); |
| 259 | xs *c_msg = msg_create(&snac, msg); | 260 | xs *c_msg = msg_create(&snac, msg); |
| 260 | 261 | ||
| 261 | if (dbglevel) { | 262 | if (dbglevel) { |
| @@ -264,6 +265,7 @@ int main(int argc, char *argv[]) | |||
| 264 | } | 265 | } |
| 265 | 266 | ||
| 266 | enqueue_message(&snac, c_msg); | 267 | enqueue_message(&snac, c_msg); |
| 268 | enqueue_close_question(&snac, xs_dict_get(msg, "id"), end_secs); | ||
| 267 | 269 | ||
| 268 | timeline_add(&snac, xs_dict_get(msg, "id"), msg); | 270 | timeline_add(&snac, xs_dict_get(msg, "id"), msg); |
| 269 | 271 | ||