]> Untitled Git - lemmy.git/blobdiff - crates/apub/src/fetcher/user_or_community.rs
Making public key required. Fixes #1934
[lemmy.git] / crates / apub / src / fetcher / user_or_community.rs
index e5dc3d935afafcd1374cef63086a6ae30688e68c..00612cbbce9828e31aaa708b0195a8c6f2ec229c 100644 (file)
@@ -2,11 +2,12 @@ use crate::{
   objects::{community::ApubCommunity, person::ApubPerson},
   protocol::objects::{group::Group, person::Person},
 };
-use activitystreams::{chrono::NaiveDateTime, url::Url};
+use chrono::NaiveDateTime;
 use lemmy_apub_lib::traits::{ActorType, ApubObject};
 use lemmy_utils::LemmyError;
 use lemmy_websocket::LemmyContext;
 use serde::Deserialize;
+use url::Url;
 
 #[derive(Clone, Debug)]
 pub enum UserOrCommunity {
@@ -102,7 +103,7 @@ impl ActorType for UserOrCommunity {
     }
   }
 
-  fn public_key(&self) -> Option<String> {
+  fn public_key(&self) -> String {
     match self {
       UserOrCommunity::User(p) => p.public_key(),
       UserOrCommunity::Community(p) => p.public_key(),