commit 50e2fc7

nicole mikołajczyk  ·  2026-08-18 12:41:35 +0000 UTC
parent 1c91738
don't return reactions count as string

Signed-off-by: nicole mikołajczyk <git@mkljczk.pl>
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             }