Skip to content

Commit

Permalink
fix(apub/verify_blocked): check actor instead of id (#70)
Browse files Browse the repository at this point in the history
  • Loading branch information
kwaa authored Sep 27, 2024
1 parent 1ff5ae4 commit a33a262
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion crates/apub/src/activities/create_or_update/note.rs
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ impl ActivityHandler for CreateOrUpdateNote {
async fn verify(&self, data: &Data<Self::DataType>) -> Result<(), Self::Error> {
// TODO
ApubPost::verify(&self.object, &self.id, data).await?;
verify_blocked(&self.id, data).await?;
verify_blocked(&self.actor(), data).await?;
Ok(())
}

Expand Down
2 changes: 1 addition & 1 deletion crates/apub/src/activities/following/follow.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ impl ActivityHandler for Follow {

async fn verify(&self, data: &Data<Self::DataType>) -> Result<(), Self::Error> {
// TODO
verify_blocked(&self.id, data).await?;
verify_blocked(&self.actor(), data).await?;
Ok(())
}

Expand Down
2 changes: 1 addition & 1 deletion crates/apub/src/activities/following/undo_follow.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ impl ActivityHandler for UndoFollow {

async fn verify(&self, data: &Data<Self::DataType>) -> Result<(), Self::Error> {
// TODO
verify_blocked(&self.id, data).await?;
verify_blocked(&self.actor(), data).await?;
Ok(())
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ impl ActivityHandler for LikeOrAnnounce {

async fn verify(&self, data: &Data<Self::DataType>) -> Result<(), Self::Error> {
// TODO
verify_blocked(&self.id, data).await?;
verify_blocked(&self.actor(), data).await?;
Ok(())
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ impl ActivityHandler for UndoLikeOrAnnounce {

async fn verify(&self, data: &Data<Self::DataType>) -> Result<(), Self::Error> {
// TODO
verify_blocked(&self.id, data).await?;
verify_blocked(&self.actor(), data).await?;
Ok(())
}

Expand Down

0 comments on commit a33a262

Please sign in to comment.