commit cc0e90f
grunfink
·
2025-06-11 02:40:47 +0000 UTC
parent 408d7fc
mastoapi: fixed reblog identifiers. This fixes weird behaviour in apps like Tusky, where boosts' content disappear after clicking on them.
1 files changed,
+6,
-0
+6,
-0
1@@ -1134,9 +1134,15 @@ xs_dict *mastoapi_status(snac *snac, const xs_dict *msg)
2 bst = xs_dict_set(bst, "content", "");
3 bst = xs_dict_set(bst, "reblog", st);
4
5+ /* reblogs must have their own id */
6+ xs *b_id = xs_fmt("%s%s", xs_dict_get(st, "id"), boosted_by_md5);
7+ bst = xs_dict_set(bst, "id", b_id);
8+
9 xs_free(st);
10 st = bst;
11 }
12+ else
13+ xs_free(bst);
14 }
15
16 return st;