summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar grunfink2025-06-11 04:40:47 +0200
committerGravatar grunfink2025-06-11 04:40:47 +0200
commitcc0e90fbf7c22991bf72af38c5d47d8b3a5ab552 (patch)
treec5deecb1a2f16b1690f323ac525b65ffad4423ac
parentUpdated TODO. (diff)
downloadsnac2-cc0e90fbf7c22991bf72af38c5d47d8b3a5ab552.tar.gz
snac2-cc0e90fbf7c22991bf72af38c5d47d8b3a5ab552.tar.xz
snac2-cc0e90fbf7c22991bf72af38c5d47d8b3a5ab552.zip
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)
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 /* reblogs must have their own id */
1138 xs *b_id = xs_fmt("%s%s", xs_dict_get(st, "id"), boosted_by_md5);
1139 bst = xs_dict_set(bst, "id", b_id);
1140
1137 xs_free(st); 1141 xs_free(st);
1138 st = bst; 1142 st = bst;
1139 } 1143 }
1144 else
1145 xs_free(bst);
1140 } 1146 }
1141 1147
1142 return st; 1148 return st;