summaryrefslogtreecommitdiff
path: root/mastoapi.c
diff options
context:
space:
mode:
authorGravatar default2024-12-15 15:47:27 +0100
committerGravatar default2024-12-15 15:47:27 +0100
commite8ae4920f6758c064bccba63f0a74d09ab57b751 (patch)
treec4053e6917f736a70d51a553dbec189b777cc27f /mastoapi.c
parentmastoapi: deleted useless code. (diff)
downloadsnac2-e8ae4920f6758c064bccba63f0a74d09ab57b751.tar.gz
snac2-e8ae4920f6758c064bccba63f0a74d09ab57b751.tar.xz
snac2-e8ae4920f6758c064bccba63f0a74d09ab57b751.zip
Fixed crash in mastoapi_status() Emoji list.
Diffstat (limited to 'mastoapi.c')
-rw-r--r--mastoapi.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/mastoapi.c b/mastoapi.c
index 4d0c063..be8be80 100644
--- a/mastoapi.c
+++ b/mastoapi.c
@@ -990,7 +990,7 @@ xs_dict *mastoapi_status(snac *snac, const xs_dict *msg)
990 const char *o_url = xs_dict_get(icon, "url"); 990 const char *o_url = xs_dict_get(icon, "url");
991 991
992 if (!xs_is_null(o_url)) { 992 if (!xs_is_null(o_url)) {
993 xs *url = make_url(o_url, snac->actor, 1); 993 xs *url = make_url(o_url, snac ? snac->actor : NULL, 1);
994 xs *nm = xs_strip_chars_i(xs_dup(name), ":"); 994 xs *nm = xs_strip_chars_i(xs_dup(name), ":");
995 995
996 d1 = xs_dict_append(d1, "shortcode", nm); 996 d1 = xs_dict_append(d1, "shortcode", nm);
@@ -1322,7 +1322,7 @@ xs_list *mastoapi_timeline(snac *user, const xs_dict *args, const char *index_fn
1322 1322
1323 const char *max_id = xs_dict_get(args, "max_id"); 1323 const char *max_id = xs_dict_get(args, "max_id");
1324 const char *since_id = xs_dict_get(args, "since_id"); 1324 const char *since_id = xs_dict_get(args, "since_id");
1325// const char *min_id = xs_dict_get(args, "min_id"); /* unsupported old-to-new navigation */ 1325 const char *min_id = xs_dict_get(args, "min_id"); /* unsupported old-to-new navigation */
1326 const char *limit_s = xs_dict_get(args, "limit"); 1326 const char *limit_s = xs_dict_get(args, "limit");
1327 int limit = 0; 1327 int limit = 0;
1328 int cnt = 0; 1328 int cnt = 0;
@@ -1333,7 +1333,7 @@ xs_list *mastoapi_timeline(snac *user, const xs_dict *args, const char *index_fn
1333 if (limit == 0) 1333 if (limit == 0)
1334 limit = 20; 1334 limit = 20;
1335 1335
1336 if (index_desc_first(f, md5, 0)) { 1336 if (min_id == NULL && index_desc_first(f, md5, 0)) {
1337 do { 1337 do {
1338 xs *msg = NULL; 1338 xs *msg = NULL;
1339 1339