community: &Community,
target: &Person,
actor: &Person,
+ context: &LemmyContext,
) -> Result<BlockUserFromCommunity, LemmyError> {
Ok(BlockUserFromCommunity {
actor: ObjectId::new(actor.actor_id()),
object: ObjectId::new(target.actor_id()),
cc: [ObjectId::new(community.actor_id())],
kind: BlockType::Block,
- id: generate_activity_id(BlockType::Block)?,
+ id: generate_activity_id(
+ BlockType::Block,
+ &context.settings().get_protocol_and_hostname(),
+ )?,
context: lemmy_context(),
unparsed: Default::default(),
})
actor: &Person,
context: &LemmyContext,
) -> Result<(), LemmyError> {
- let block = BlockUserFromCommunity::new(community, target, actor)?;
+ let block = BlockUserFromCommunity::new(community, target, actor, context)?;
let block_id = block.id.clone();
let activity = AnnouncableActivities::BlockUserFromCommunity(block);
context: &LemmyContext,
request_counter: &mut i32,
) -> Result<(), LemmyError> {
- verify_activity(self)?;
+ verify_activity(self, &context.settings())?;
verify_person_in_community(&self.actor, &self.cc[0], context, request_counter).await?;
verify_mod_action(&self.actor, self.cc[0].clone(), context).await?;
Ok(())