From cc0e90fbf7c22991bf72af38c5d47d8b3a5ab552 Mon Sep 17 00:00:00 2001 From: grunfink Date: Wed, 11 Jun 2025 04:40:47 +0200 Subject: mastoapi: fixed reblog identifiers. This fixes weird behaviour in apps like Tusky, where boosts' content disappear after clicking on them. --- mastoapi.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'mastoapi.c') diff --git a/mastoapi.c b/mastoapi.c index 27c476e..2c86ff9 100644 --- a/mastoapi.c +++ b/mastoapi.c @@ -1134,9 +1134,15 @@ xs_dict *mastoapi_status(snac *snac, const xs_dict *msg) bst = xs_dict_set(bst, "content", ""); bst = xs_dict_set(bst, "reblog", st); + /* reblogs must have their own id */ + xs *b_id = xs_fmt("%s%s", xs_dict_get(st, "id"), boosted_by_md5); + bst = xs_dict_set(bst, "id", b_id); + xs_free(st); st = bst; } + else + xs_free(bst); } return st; -- cgit v1.2.3