actor: mod_.id().into(),
to: vec![public()],
object: block,
- cc: generate_cc(target, context.pool()).await?,
+ cc: generate_cc(target, &mut context.pool()).await?,
kind: UndoType::Undo,
id: id.clone(),
audience,
let mut inboxes = vec![user.shared_inbox_or_inbox()];
match target {
SiteOrCommunity::Site(_) => {
- inboxes.append(&mut remote_instance_inboxes(context.pool()).await?);
+ inboxes.append(&mut remote_instance_inboxes(&mut context.pool()).await?);
send_lemmy_activity(context, undo, mod_, inboxes, false).await
}
SiteOrCommunity::Community(c) => {
match self.object.target.dereference(context).await? {
SiteOrCommunity::Site(_site) => {
let blocked_person = Person::update(
- context.pool(),
+ &mut context.pool(),
blocked_person.id,
&PersonUpdateForm::builder()
.banned(Some(false))
banned: Some(false),
expires,
};
- ModBan::create(context.pool(), &form).await?;
+ ModBan::create(&mut context.pool(), &form).await?;
}
SiteOrCommunity::Community(community) => {
let community_user_ban_form = CommunityPersonBanForm {
person_id: blocked_person.id,
expires: None,
};
- CommunityPersonBan::unban(context.pool(), &community_user_ban_form).await?;
+ CommunityPersonBan::unban(&mut context.pool(), &community_user_ban_form).await?;
// write to mod log
let form = ModBanFromCommunityForm {
banned: Some(false),
expires,
};
- ModBanFromCommunity::create(context.pool(), &form).await?;
+ ModBanFromCommunity::create(&mut context.pool(), &form).await?;
}
}