commit f9da158
Merge pull request 'don't return reactions count as string' (#643) from mkljczk/snac2:reacts-count-number into master Reviewed-on: https://codeberg.org/grunfink/snac2/pulls/643
1 files changed,
+2,
-2
+2,
-2
1@@ -1186,13 +1186,13 @@ xs_dict *mastoapi_status(snac *snac, const xs_dict *msg)
2 int count = 1;
3
4 if (contentl) {
5- count = atoi(xs_list_get(contentl, 0)) + 1;
6+ count = xs_number_get(xs_list_get(contentl, 0)) + 1;
7 if (strncmp(xs_list_get(contentl, 1), xs_stock(XSTYPE_TRUE), 1) == 0)
8 me = xs_stock(XSTYPE_TRUE);
9 }
10
11 xs *fl = xs_list_new();
12- xs *c1 = xs_fmt("%d", count);
13+ xs *c1 = xs_number_new(count);
14 fl = xs_list_append(fl, c1, me);
15 sfrl = xs_dict_append(sfrl, content, fl);
16 }