From 1219dbca344766257f17e73873a4f549a62f360b Mon Sep 17 00:00:00 2001 From: alemi Date: Sun, 12 May 2024 00:56:22 +0200 Subject: [PATCH] fix: ownerships --- src/server/inbox.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/server/inbox.rs b/src/server/inbox.rs index 6df520c..7db572a 100644 --- a/src/server/inbox.rs +++ b/src/server/inbox.rs @@ -60,10 +60,10 @@ impl apb::server::Inbox for Context { .await?; } // lemmy sends us an image field in posts, treat it like an attachment i'd say - if let Some(img) = object.image().get() { - let attachment_model = model::attachment::ActiveModel::new(img, object_model.id.clone())?; + if let Some(img) = object_node.image().get() { + let attachment_model = model::attachment::ActiveModel::new(img, oid.clone())?; model::attachment::Entity::insert(attachment_model) - .exec(ctx.db()) + .exec(self.db()) .await?; } // TODO can we even receive anonymous objects?