fix: ownerships

This commit is contained in:
əlemi 2024-05-12 00:56:22 +02:00
parent ab0300894f
commit 1219dbca34
Signed by: alemi
GPG key ID: A4895B84D311642C

View file

@ -60,10 +60,10 @@ impl apb::server::Inbox for Context {
.await?; .await?;
} }
// lemmy sends us an image field in posts, treat it like an attachment i'd say // lemmy sends us an image field in posts, treat it like an attachment i'd say
if let Some(img) = object.image().get() { if let Some(img) = object_node.image().get() {
let attachment_model = model::attachment::ActiveModel::new(img, object_model.id.clone())?; let attachment_model = model::attachment::ActiveModel::new(img, oid.clone())?;
model::attachment::Entity::insert(attachment_model) model::attachment::Entity::insert(attachment_model)
.exec(ctx.db()) .exec(self.db())
.await?; .await?;
} }
// TODO can we even receive anonymous objects? // TODO can we even receive anonymous objects?