aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgrunfink <grunfink@comam.es>2025-06-11 04:40:47 +0200
committergrunfink <grunfink@comam.es>2025-06-11 04:40:47 +0200
commitcc0e90fbf7c22991bf72af38c5d47d8b3a5ab552 (patch)
treec5deecb1a2f16b1690f323ac525b65ffad4423ac
parent408d7fcd0a0e4368120c02850b620abc4d10a9d0 (diff)
mastoapi: fixed reblog identifiers.
This fixes weird behaviour in apps like Tusky, where boosts' content disappear after clicking on them.
-rw-r--r--mastoapi.c6
1 files changed, 6 insertions, 0 deletions
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;