diff options
| author | 2025-06-11 04:40:47 +0200 | |
|---|---|---|
| committer | 2025-06-11 04:40:47 +0200 | |
| commit | cc0e90fbf7c22991bf72af38c5d47d8b3a5ab552 (patch) | |
| tree | c5deecb1a2f16b1690f323ac525b65ffad4423ac /mastoapi.c | |
| parent | Updated TODO. (diff) | |
| download | snac2-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.
Diffstat (limited to 'mastoapi.c')
| -rw-r--r-- | mastoapi.c | 6 |
1 files changed, 6 insertions, 0 deletions
| @@ -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; |