commit d7b74574adb18ea4da2c41ec06360608b3db4a0e
parent aea0ea44166aa7d488208cf16bc4bb44307bc272
Author: default <nobody@localhost>
Date: Mon, 29 May 2023 10:11:14 +0200
update_question() also updates the count of voters.
Diffstat:
1 file changed, 4 insertions(+), 0 deletions(-)
diff --git a/activitypub.c b/activitypub.c
@@ -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);