- async fn verify(
- &self,
- context: &Data<LemmyContext>,
- request_counter: &mut i32,
- ) -> Result<(), LemmyError> {
- verify_is_public(&self.to)?;
- verify_activity(&self.id, self.actor.inner(), &context.settings())?;
- self.object.verify(context, request_counter).await?;
- let community = self.get_community(context, request_counter).await?;
- verify_delete_activity(
- &self.object.object,
- &self.actor,
- &community,
- self.object.summary.is_some(),
- context,
- request_counter,
- )
- .await?;
+ type Error = LemmyError;
+
+ fn id(&self) -> &Url {
+ &self.id
+ }
+
+ fn actor(&self) -> &Url {
+ self.actor.inner()
+ }
+
+ async fn verify(&self, data: &Data<Self::DataType>) -> Result<(), Self::Error> {
+ insert_received_activity(&self.id, data).await?;
+ self.object.verify(data).await?;
+ verify_delete_activity(&self.object, self.object.summary.is_some(), data).await?;