From b2e6703b0e1247797dd80a189c5737f5e4823c14 Mon Sep 17 00:00:00 2001 From: alemi Date: Thu, 18 Apr 2024 04:38:21 +0200 Subject: [PATCH] feat: also fetch liked posts --- src/server/inbox.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/server/inbox.rs b/src/server/inbox.rs index 7c1fddf3..94244858 100644 --- a/src/server/inbox.rs +++ b/src/server/inbox.rs @@ -34,6 +34,9 @@ impl apb::server::Inbox for Context { let aid = activity.id().ok_or(UpubError::bad_request())?; let uid = activity.actor().id().ok_or(UpubError::bad_request())?; let oid = activity.object().id().ok_or(UpubError::bad_request())?; + if let Err(e) = self.fetch().object(&oid).await { + tracing::warn!("failed fetching liked object: {e}"); + } let like = model::like::ActiveModel { id: sea_orm::ActiveValue::NotSet, actor: sea_orm::Set(uid.clone()),