diff options
| -rw-r--r-- | activitypub.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/activitypub.c b/activitypub.c index e9e28be..8eb7844 100644 --- a/activitypub.c +++ b/activitypub.c @@ -2322,13 +2322,16 @@ xs_dict *msg_question(snac *user, const char *content, xs_list *attach, /* creates a Question message */ { xs_dict *msg = msg_note(user, content, NULL, NULL, attach, 0, NULL, NULL); - size_t max_line = 200; - int max = 8; const xs_number *max_options = xs_dict_get(srv_config, "max_poll_options"); + const xs_number *max_length = xs_dict_get(srv_config, "max_poll_option_length"); xs_set seen; + size_t max_line = 60; + int max = 8; if (xs_type(max_options) == XSTYPE_NUMBER) max = xs_number_get(max_options); + if (xs_type(max_length) == XSTYPE_NUMBER) + max_line = xs_number_get(max_length); msg = xs_dict_set(msg, "type", "Question"); |