context: &Data<LemmyContext>,
) -> Result<(), LemmyError> {
let local_user_view = local_user_view_from_jwt(&request.auth, context).await?;
- let community = Community::read(context.pool(), response.post_view.community.id).await?;
+ let community = Community::read(&mut context.pool(), response.post_view.community.id).await?;
let deletable = DeletableObjects::Post(response.post_view.post.clone().into());
send_apub_delete_in_community(
local_user_view.person,
context: &Data<LemmyContext>,
) -> Result<(), LemmyError> {
let local_user_view = local_user_view_from_jwt(&request.auth, context).await?;
- let community = Community::read(context.pool(), response.post_view.community.id).await?;
+ let community = Community::read(&mut context.pool(), response.post_view.community.id).await?;
let deletable = DeletableObjects::Post(response.post_view.post.clone().into());
send_apub_delete_in_community(
local_user_view.person,
context: &Data<LemmyContext>,
) -> Result<(), LemmyError> {
let community_id = response.comment_view.community.id;
- let community = Community::read(context.pool(), community_id).await?;
- let person = Person::read(context.pool(), response.comment_view.creator.id).await?;
+ let community = Community::read(&mut context.pool(), community_id).await?;
+ let person = Person::read(&mut context.pool(), response.comment_view.creator.id).await?;
let deletable = DeletableObjects::Comment(response.comment_view.comment.clone().into());
send_apub_delete_in_community(person, community, deletable, None, request.deleted, context)
.await
context: &Data<LemmyContext>,
) -> Result<(), LemmyError> {
let local_user_view = local_user_view_from_jwt(&request.auth, context).await?;
- let comment = Comment::read(context.pool(), request.comment_id).await?;
- let community = Community::read(context.pool(), response.comment_view.community.id).await?;
+ let comment = Comment::read(&mut context.pool(), request.comment_id).await?;
+ let community =
+ Community::read(&mut context.pool(), response.comment_view.community.id).await?;
let deletable = DeletableObjects::Comment(comment.into());
send_apub_delete_in_community(
local_user_view.person,
context: &Data<LemmyContext>,
) -> Result<(), LemmyError> {
let local_user_view = local_user_view_from_jwt(&request.auth, context).await?;
- let community = Community::read(context.pool(), request.community_id).await?;
+ let community = Community::read(&mut context.pool(), request.community_id).await?;
let deletable = DeletableObjects::Community(community.clone().into());
send_apub_delete_in_community(
local_user_view.person,
context: &Data<LemmyContext>,
) -> Result<(), LemmyError> {
let local_user_view = local_user_view_from_jwt(&request.auth, context).await?;
- let community = Community::read(context.pool(), request.community_id).await?;
+ let community = Community::read(&mut context.pool(), request.community_id).await?;
let deletable = DeletableObjects::Community(community.clone().into());
send_apub_delete_in_community(
local_user_view.person,
context: &Data<LemmyContext>,
) -> Result<(), LemmyError> {
let recipient_id = pm.recipient_id;
- let recipient: ApubPerson = Person::read(context.pool(), recipient_id).await?.into();
+ let recipient: ApubPerson = Person::read(&mut context.pool(), recipient_id)
+ .await?
+ .into();
let deletable = DeletableObjects::PrivateMessage(pm.into());
let inbox = vec![recipient.shared_inbox_or_inbox()];
}
Community::update(
- context.pool(),
+ &mut context.pool(),
community.id,
&CommunityUpdateForm::builder()
.deleted(Some(deleted))
DeletableObjects::Post(post) => {
if deleted != post.deleted {
Post::update(
- context.pool(),
+ &mut context.pool(),
post.id,
&PostUpdateForm::builder().deleted(Some(deleted)).build(),
)
DeletableObjects::Comment(comment) => {
if deleted != comment.deleted {
Comment::update(
- context.pool(),
+ &mut context.pool(),
comment.id,
&CommentUpdateForm::builder().deleted(Some(deleted)).build(),
)
}
DeletableObjects::PrivateMessage(pm) => {
PrivateMessage::update(
- context.pool(),
+ &mut context.pool(),
pm.id,
&PrivateMessageUpdateForm::builder()
.deleted(Some(deleted))