diff options
| author | 2023-04-23 14:50:54 +0200 | |
|---|---|---|
| committer | 2023-04-23 14:50:54 +0200 | |
| commit | 04ba2818cb3c6e0054d9f97c1ae5efaae6c8d1b5 (patch) | |
| tree | 4b2afe33e393f86c259149530b584c10e04cf177 | |
| parent | Strip the query string in msg_follow(). (diff) | |
| download | penes-snac2-04ba2818cb3c6e0054d9f97c1ae5efaae6c8d1b5.tar.gz penes-snac2-04ba2818cb3c6e0054d9f97c1ae5efaae6c8d1b5.tar.xz penes-snac2-04ba2818cb3c6e0054d9f97c1ae5efaae6c8d1b5.zip | |
Fixed a bug in the instance timeline.
| -rw-r--r-- | mastoapi.c | 6 |
1 files changed, 3 insertions, 3 deletions
| @@ -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); |