diff options
author | default <nobody@localhost> | 2023-10-13 09:14:11 +0200 |
---|---|---|
committer | default <nobody@localhost> | 2023-10-13 09:14:11 +0200 |
commit | 3385bda618941e7412dc5450f53c5b15dba78217 (patch) | |
tree | b2ab953d35160eeac0272c32f3ae97522f458376 | |
parent | 3578965b4ecd38587a51cf781df025b24eae7bb0 (diff) |
Minor URI tweak.
-rw-r--r-- | mastoapi.c | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -946,12 +946,17 @@ xs_dict *mastoapi_status(snac *snac, const xs_dict *msg) if (valid_status(object_get_by_md5(boosted_by_md5, &b_actor))) { xs *b_acct = mastoapi_account(b_actor); - xs *fake_uri = xs_fmt("%s/d/%s", srv_baseurl, mid); + xs *fake_uri = NULL; + + if (snac) + fake_uri = xs_fmt("%s/d/%s/Announce", snac->actor, mid); + else + fake_uri = xs_fmt("%s#%s", srv_baseurl, mid); bst = xs_dict_append(bst, "id", mid); bst = xs_dict_append(bst, "created_at", xs_dict_get(st, "created_at")); - bst = xs_dict_append(bst, "account", b_acct); bst = xs_dict_append(bst, "uri", fake_uri); + bst = xs_dict_append(bst, "account", b_acct); bst = xs_dict_append(bst, "content", ""); bst = xs_dict_append(bst, "reblog", st); |