diff --git a/crates/adapters/sqlite-federation/src/lib.rs b/crates/adapters/sqlite-federation/src/lib.rs
index de08c86..17ff876 100644
--- a/crates/adapters/sqlite-federation/src/lib.rs
+++ b/crates/adapters/sqlite-federation/src/lib.rs
@@ -266,14 +266,15 @@ impl FederationRepository for SqliteFederationRepository {
let fetched_at = datetime_to_str(&now);
sqlx::query(
- "INSERT INTO ap_remote_actors (url, handle, inbox_url, shared_inbox_url, display_name, avatar_url, fetched_at)
- VALUES (?, ?, ?, ?, ?, ?, ?)
+ "INSERT INTO ap_remote_actors (url, handle, inbox_url, shared_inbox_url, display_name, avatar_url, outbox_url, fetched_at)
+ VALUES (?, ?, ?, ?, ?, ?, ?, ?)
ON CONFLICT(url) DO UPDATE SET
handle = excluded.handle,
inbox_url = excluded.inbox_url,
shared_inbox_url = excluded.shared_inbox_url,
display_name = excluded.display_name,
avatar_url = excluded.avatar_url,
+ outbox_url = COALESCE(excluded.outbox_url, ap_remote_actors.outbox_url),
fetched_at = excluded.fetched_at",
)
.bind(&actor.url)
@@ -282,6 +283,7 @@ impl FederationRepository for SqliteFederationRepository {
.bind(&actor.shared_inbox_url)
.bind(&actor.display_name)
.bind(&actor.avatar_url)
+ .bind(&actor.outbox_url)
.bind(&fetched_at)
.execute(&self.pool)
.await?;
@@ -407,10 +409,21 @@ impl FederationRepository for SqliteFederationRepository {
async fn get_following_outbox_url(
&self,
- _local_user_id: uuid::Uuid,
- _remote_actor_url: &str,
+ local_user_id: uuid::Uuid,
+ remote_actor_url: &str,
) -> Result