snac2

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

commit bf965122967f38fb93fdfa1067543c968d847a2b
parent 50624547e4b3eb05b3ee0a185ef975fce3c8e19a
Author: default <nobody@localhost>
Date:   Mon, 29 May 2023 08:00:43 +0200

Added the 'replies' dict to each question.

Diffstat:
Mactivitypub.c | 4+++-
1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/activitypub.c b/activitypub.c @@ -945,11 +945,13 @@ xs_dict *msg_question(snac *user, const char *content, const xs_list *opts, int xs *o = xs_list_new(); xs_list *p = (xs_list *)opts; xs_str *v; + xs *replies = xs_json_loads("{\"type\":\"Collection\",\"totalItems\":0}"); while (xs_list_iter(&p, &v)) { xs *d = xs_dict_new(); - d = xs_dict_append(d, "name", v); + d = xs_dict_append(d, "name", v); + d = xs_dict_append(d, "replies", replies); o = xs_list_append(o, d); }