]> Untitled Git - lemmy.git/blobdiff - crates/apub/src/activities/voting/undo_vote.rs
Moving settings and secrets to context.
[lemmy.git] / crates / apub / src / activities / voting / undo_vote.rs
index e11d29602c41452d1d3bf3ee0bfcded368a985bb..963292fa576b369ee293acffa768676700f1e8ef 100644 (file)
@@ -64,8 +64,11 @@ impl UndoVote {
     })
     .await??;
 
-    let object = Vote::new(object, actor, &community, kind.clone())?;
-    let id = generate_activity_id(UndoType::Undo)?;
+    let object = Vote::new(object, actor, &community, kind.clone(), context)?;
+    let id = generate_activity_id(
+      UndoType::Undo,
+      &context.settings().get_protocol_and_hostname(),
+    )?;
     let undo_vote = UndoVote {
       actor: ObjectId::new(actor.actor_id()),
       to: [PublicUrl::Public],
@@ -88,7 +91,7 @@ impl ActivityHandler for UndoVote {
     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_urls_match(self.actor(), self.object.actor())?;
     self.object.verify(context, request_counter).await?;