Compare commits
2 commits
ab0300894f
...
38efbeb76f
Author | SHA1 | Date | |
---|---|---|---|
38efbeb76f | |||
1219dbca34 |
2 changed files with 6 additions and 6 deletions
|
@ -1,6 +1,6 @@
|
|||
use axum::{extract::{Path, Query, State}, http::StatusCode, Json};
|
||||
use mastodon_async_entities::{account::{Account, AccountId}, status::Status};
|
||||
use sea_orm::{ColumnTrait, EntityTrait, QueryFilter};
|
||||
use axum::{extract::{Path, State}, http::StatusCode, Json};
|
||||
use mastodon_async_entities::account::{Account, AccountId};
|
||||
use sea_orm::EntityTrait;
|
||||
|
||||
use crate::{model, server::{auth::AuthIdentity, Context}};
|
||||
|
||||
|
|
|
@ -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?
|
||||
|
|
Loading…
Reference in a new issue