commit e8ae492

default  ·  2024-12-15 14:47:27 +0000 UTC
parent b2d301d
Fixed crash in mastoapi_status() Emoji list.
1 files changed,  +3, -3
+3, -3
 1@@ -990,7 +990,7 @@ xs_dict *mastoapi_status(snac *snac, const xs_dict *msg)
 2                     const char *o_url = xs_dict_get(icon, "url");
 3 
 4                     if (!xs_is_null(o_url)) {
 5-                        xs *url = make_url(o_url, snac->actor, 1);
 6+                        xs *url = make_url(o_url, snac ? snac->actor : NULL, 1);
 7                         xs *nm = xs_strip_chars_i(xs_dup(name), ":");
 8 
 9                         d1 = xs_dict_append(d1, "shortcode", nm);
10@@ -1322,7 +1322,7 @@ xs_list *mastoapi_timeline(snac *user, const xs_dict *args, const char *index_fn
11 
12     const char *max_id   = xs_dict_get(args, "max_id");
13     const char *since_id = xs_dict_get(args, "since_id");
14-//    const char *min_id   = xs_dict_get(args, "min_id"); /* unsupported old-to-new navigation */
15+    const char *min_id   = xs_dict_get(args, "min_id"); /* unsupported old-to-new navigation */
16     const char *limit_s  = xs_dict_get(args, "limit");
17     int limit = 0;
18     int cnt   = 0;
19@@ -1333,7 +1333,7 @@ xs_list *mastoapi_timeline(snac *user, const xs_dict *args, const char *index_fn
20     if (limit == 0)
21         limit = 20;
22 
23-    if (index_desc_first(f, md5, 0)) {
24+    if (min_id == NULL && index_desc_first(f, md5, 0)) {
25         do {
26             xs *msg = NULL;
27