upub/apb/src/target.rs
2024-05-23 01:59:22 +02:00

17 lines
392 B
Rust

use crate::Object;
pub const PUBLIC : &str = "https://www.w3.org/ns/activitystreams#Public";
pub trait Addressed {
fn addressed(&self) -> Vec<String>;
}
impl<T: Object> Addressed for T {
fn addressed(&self) -> Vec<String> {
let mut to : Vec<String> = self.to().ids();
to.append(&mut self.bto().ids());
to.append(&mut self.cc().ids());
to.append(&mut self.bcc().ids());
to
}
}