diff options
| author | 2025-06-12 10:59:26 +0200 | |
|---|---|---|
| committer | 2025-06-12 10:59:26 +0200 | |
| commit | 55213f660d0c2a14ee5b556c4422b3b9199c9355 (patch) | |
| tree | e1491fc2f25c642ff4d8fcac6a01a95e36ed72e8 /mastoapi.c | |
| parent | Updated RELEASE_NOTES. (diff) | |
| download | penes-snac2-55213f660d0c2a14ee5b556c4422b3b9199c9355.tar.gz penes-snac2-55213f660d0c2a14ee5b556c4422b3b9199c9355.tar.xz penes-snac2-55213f660d0c2a14ee5b556c4422b3b9199c9355.zip | |
mastoapi: another try to fix collapsing boosted posts in some apps.
Diffstat (limited to 'mastoapi.c')
| -rw-r--r-- | mastoapi.c | 11 |
1 files changed, 8 insertions, 3 deletions
| @@ -1134,6 +1134,9 @@ xs_dict *mastoapi_status(snac *snac, const xs_dict *msg) | |||
| 1134 | bst = xs_dict_set(bst, "content", ""); | 1134 | bst = xs_dict_set(bst, "content", ""); |
| 1135 | bst = xs_dict_set(bst, "reblog", st); | 1135 | bst = xs_dict_set(bst, "reblog", st); |
| 1136 | 1136 | ||
| 1137 | xs *b_id = xs_toupper_i(xs_dup(xs_dict_get(st, "id"))); | ||
| 1138 | bst = xs_dict_set(bst, "id", b_id); | ||
| 1139 | |||
| 1137 | xs_free(st); | 1140 | xs_free(st); |
| 1138 | st = bst; | 1141 | st = bst; |
| 1139 | } | 1142 | } |
| @@ -2338,15 +2341,17 @@ int mastoapi_get_handler(const xs_dict *req, const char *q_path, | |||
| 2338 | /* information about a status */ | 2341 | /* information about a status */ |
| 2339 | if (logged_in) { | 2342 | if (logged_in) { |
| 2340 | xs *l = xs_split(cmd, "/"); | 2343 | xs *l = xs_split(cmd, "/"); |
| 2341 | const char *id = xs_list_get(l, 3); | 2344 | const char *oid = xs_list_get(l, 3); |
| 2342 | const char *op = xs_list_get(l, 4); | 2345 | const char *op = xs_list_get(l, 4); |
| 2343 | 2346 | ||
| 2344 | if (!xs_is_null(id)) { | 2347 | if (!xs_is_null(oid)) { |
| 2345 | xs *msg = NULL; | 2348 | xs *msg = NULL; |
| 2346 | xs *out = NULL; | 2349 | xs *out = NULL; |
| 2347 | 2350 | ||
| 2348 | /* skip the 'fake' part of the id */ | 2351 | /* skip the 'fake' part of the id */ |
| 2349 | id = MID_TO_MD5(id); | 2352 | oid = MID_TO_MD5(oid); |
| 2353 | |||
| 2354 | xs *id = xs_tolower_i(xs_dup(oid)); | ||
| 2350 | 2355 | ||
| 2351 | if (valid_status(object_get_by_md5(id, &msg))) { | 2356 | if (valid_status(object_get_by_md5(id, &msg))) { |
| 2352 | if (op == NULL) { | 2357 | if (op == NULL) { |