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 {
impl ActorType for UserOrCommunity {
fn actor_id(&self) -> Url {
- todo!()
+ match self {
+ UserOrCommunity::User(p) => p.actor_id(),
+ UserOrCommunity::Community(p) => p.actor_id(),
+ }
}
- 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(),