summaryrefslogtreecommitdiff
path: root/mastoapi.c
diff options
context:
space:
mode:
authorGravatar default2023-04-23 14:50:54 +0200
committerGravatar default2023-04-23 14:50:54 +0200
commit04ba2818cb3c6e0054d9f97c1ae5efaae6c8d1b5 (patch)
tree4b2afe33e393f86c259149530b584c10e04cf177 /mastoapi.c
parentStrip the query string in msg_follow(). (diff)
downloadsnac2-04ba2818cb3c6e0054d9f97c1ae5efaae6c8d1b5.tar.gz
snac2-04ba2818cb3c6e0054d9f97c1ae5efaae6c8d1b5.tar.xz
snac2-04ba2818cb3c6e0054d9f97c1ae5efaae6c8d1b5.zip
Fixed a bug in the instance timeline.
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 7376e5e..e52f86b 100644
--- a/mastoapi.c
+++ b/mastoapi.c
@@ -913,7 +913,7 @@ int mastoapi_get_handler(const xs_dict *req, const char *q_path,
913 if (strcmp(cmd, "/v1/timelines/public") == 0) { 913 if (strcmp(cmd, "/v1/timelines/public") == 0) {
914 /* the public timeline (public timelines for all users) */ 914 /* the public timeline (public timelines for all users) */
915 915
916 /* this is a kludge: first users in the list get all the fame */ 916 /* this is an ugly kludge: first users in the list get all the fame */
917 917
918 const char *limit_s = xs_dict_get(args, "limit"); 918 const char *limit_s = xs_dict_get(args, "limit");
919 int limit = 0; 919 int limit = 0;
@@ -934,7 +934,7 @@ int mastoapi_get_handler(const xs_dict *req, const char *q_path,
934 snac user; 934 snac user;
935 935
936 if (user_open(&user, uid)) { 936 if (user_open(&user, uid)) {
937 xs *timeline = timeline_simple_list(&snac1, "public", 0, 4); 937 xs *timeline = timeline_simple_list(&user, "public", 0, 4);
938 xs_list *p2 = timeline; 938 xs_list *p2 = timeline;
939 xs_str *v; 939 xs_str *v;
940 940
@@ -954,7 +954,7 @@ int mastoapi_get_handler(const xs_dict *req, const char *q_path,
954 continue; 954 continue;
955 955
956 /* convert the Note into a Mastodon status */ 956 /* convert the Note into a Mastodon status */
957 xs *st = mastoapi_status(&snac1, msg); 957 xs *st = mastoapi_status(&user, msg);
958 958
959 if (st != NULL) { 959 if (st != NULL) {
960 out = xs_list_append(out, st); 960 out = xs_list_append(out, st);