Slon/Modules/ActivityPub: Use @slon_api_find_status_by_uri to handle receiving replies to statuses

This commit is contained in:
Alec Murphy 2025-03-17 17:45:30 -04:00
parent ffc37f220a
commit a5460ece4b

View file

@ -785,7 +785,7 @@ JsonObject* @slon_activitypub_create_status_for_remote_account(SlonHttpSession*
} }
if (account && (o->@("inReplyTo") || o->@("inReplyToAtomUri"))) { if (account && (o->@("inReplyTo") || o->@("inReplyToAtomUri"))) {
JsonObject* reply_to_post = @slon_activitypub_status_by_uri(o->@("inReplyTo"), db->o("timelines")->o("home")->a(account->@("id"))); JsonObject* reply_to_post = @slon_api_find_status_by_uri(o->@("inReplyTo"), account->@("id"));
if (reply_to_post) { if (reply_to_post) {
new_status->set("in_reply_to_id", reply_to_post->@("id"), JSON_STRING); new_status->set("in_reply_to_id", reply_to_post->@("id"), JSON_STRING);
new_status->set("in_reply_to_acct_id", reply_to_post->o("account")->@("id"), JSON_STRING); new_status->set("in_reply_to_acct_id", reply_to_post->o("account")->@("id"), JSON_STRING);