diff options
| author | 2023-05-29 10:11:14 +0200 | |
|---|---|---|
| committer | 2023-05-29 10:11:14 +0200 | |
| commit | d7b74574adb18ea4da2c41ec06360608b3db4a0e (patch) | |
| tree | 08395d647b76f3b879506e143e66624f0d8e624e /activitypub.c | |
| parent | In update_question(), send the updated question to all voters. (diff) | |
| download | snac2-d7b74574adb18ea4da2c41ec06360608b3db4a0e.tar.gz snac2-d7b74574adb18ea4da2c41ec06360608b3db4a0e.tar.xz snac2-d7b74574adb18ea4da2c41ec06360608b3db4a0e.zip | |
update_question() also updates the count of voters.
Diffstat (limited to 'activitypub.c')
| -rw-r--r-- | activitypub.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/activitypub.c b/activitypub.c index da64573..c80069b 100644 --- a/activitypub.c +++ b/activitypub.c | |||
| @@ -1057,6 +1057,10 @@ int update_question(snac *user, const char *id) | |||
| 1057 | msg = xs_dict_set(msg, "closed", end_time); | 1057 | msg = xs_dict_set(msg, "closed", end_time); |
| 1058 | } | 1058 | } |
| 1059 | 1059 | ||
| 1060 | /* update the count of voters */ | ||
| 1061 | xs *vcnt = xs_number_new(xs_list_len(rcpts)); | ||
| 1062 | msg = xs_dict_set(msg, "votersCount", vcnt); | ||
| 1063 | |||
| 1060 | /* store */ | 1064 | /* store */ |
| 1061 | object_add_ow(id, msg); | 1065 | object_add_ow(id, msg); |
| 1062 | 1066 | ||