mirror of
https://codeberg.org/grunfink/snac2.git
synced 2024-11-14 17:45:04 +00:00
update_question() also updates the count of voters.
This commit is contained in:
parent
aea0ea4416
commit
d7b74574ad
1 changed files with 4 additions and 0 deletions
|
@ -1057,6 +1057,10 @@ int update_question(snac *user, const char *id)
|
|||
msg = xs_dict_set(msg, "closed", end_time);
|
||||
}
|
||||
|
||||
/* update the count of voters */
|
||||
xs *vcnt = xs_number_new(xs_list_len(rcpts));
|
||||
msg = xs_dict_set(msg, "votersCount", vcnt);
|
||||
|
||||
/* store */
|
||||
object_add_ow(id, msg);
|
||||
|
||||
|
|
Loading…
Reference in a new issue