snac2

Fork of https://codeberg.org/grunfink/snac2
git clone https://git.inz.fi/snac2
Log | Files | Refs | README | LICENSE

commit 21efd9cd9cd0b337c164597704010d47cb6424a9
parent 41b43e74d04a75c283c884b7e8a319d65f10b1b9
Author: default <nobody@localhost>
Date:   Fri, 31 May 2024 19:29:17 +0200

mastoapi: added an 'emojis' field to mastoapi_poll().

Diffstat:
Mmastoapi.c | 2++
1 file changed, 2 insertions(+), 0 deletions(-)

diff --git a/mastoapi.c b/mastoapi.c @@ -763,6 +763,8 @@ xs_dict *mastoapi_poll(snac *snac, const xs_dict *msg) xs *vc = xs_number_new(num_votes); poll = xs_dict_append(poll, "votes_count", vc); + poll = xs_dict_append(poll, "emojis", xs_stock(XSTYPE_LIST)); + poll = xs_dict_append(poll, "voted", (snac && was_question_voted(snac, xs_dict_get(msg, "id"))) ? xs_stock(XSTYPE_TRUE) : xs_stock(XSTYPE_FALSE));