diff options
| author | green <dandelions@disroot.org> | 2025-04-12 21:56:23 +0200 |
|---|---|---|
| committer | green <dandelions@disroot.org> | 2026-01-24 02:23:16 +0100 |
| commit | 50129db64b70604d347c2f21be5e5182080c6e07 (patch) | |
| tree | c1753b574db1052897276b4180ef57854f437260 /activitypub.c | |
| parent | c6b411ac34e80505517bf120153017ec42943d4e (diff) | |
small: configurable poll limit
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 c34e510..2890a94 100644 --- a/activitypub.c +++ b/activitypub.c @@ -2322,8 +2322,12 @@ xs_dict *msg_question(snac *user, const char *content, xs_list *attach, { xs_dict *msg = msg_note(user, content, NULL, NULL, attach, 0, NULL, NULL); int max = 8; + const xs_number *max_options = xs_dict_get(srv_config, "max_poll_options"); xs_set seen; + if (xs_type(max_options) == XSTYPE_NUMBER) + max = xs_number_get(max_options); + msg = xs_dict_set(msg, "type", "Question"); /* make it non-editable */ |