use lemmy_websocket::LemmyContext;
impl UndoBlockUserFromCommunity {
+ #[tracing::instrument(skip_all)]
pub async fn send(
community: &ApubCommunity,
target: &ApubPerson,
actor: &ApubPerson,
context: &LemmyContext,
) -> Result<(), LemmyError> {
- let block = BlockUserFromCommunity::new(community, target, actor, context)?;
+ let block = BlockUserFromCommunity::new(community, target, actor, None, context)?;
let id = generate_activity_id(
UndoType::Undo,
#[async_trait::async_trait(?Send)]
impl ActivityHandler for UndoBlockUserFromCommunity {
type DataType = LemmyContext;
+
+ #[tracing::instrument(skip_all)]
async fn verify(
&self,
context: &Data<LemmyContext>,
Ok(())
}
+ #[tracing::instrument(skip_all)]
async fn receive(
self,
context: &Data<LemmyContext>,
let blocked_user = self
.object
.object
- .dereference(context, request_counter)
+ .dereference(context, context.client(), request_counter)
.await?;
let community_user_ban_form = CommunityPersonBanForm {
community_id: community.id,
person_id: blocked_user.id,
+ expires: None,
};
blocking(context.pool(), move |conn: &'_ _| {
#[async_trait::async_trait(?Send)]
impl GetCommunity for UndoBlockUserFromCommunity {
+ #[tracing::instrument(skip_all)]
async fn get_community(
&self,
context: &LemmyContext,