2024-05-23 01:59:22 +02:00
|
|
|
use crate::Object;
|
2024-04-11 00:27:17 +02:00
|
|
|
|
|
|
|
pub const PUBLIC : &str = "https://www.w3.org/ns/activitystreams#Public";
|
|
|
|
|
2024-05-02 02:58:19 +02:00
|
|
|
pub trait Addressed {
|
2024-04-11 00:27:17 +02:00
|
|
|
fn addressed(&self) -> Vec<String>;
|
|
|
|
}
|
|
|
|
|
2024-05-19 21:19:22 +02:00
|
|
|
impl<T: Object> Addressed for T {
|
2024-04-11 00:27:17 +02:00
|
|
|
fn addressed(&self) -> Vec<String> {
|
2024-05-22 16:34:37 +02:00
|
|
|
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());
|
2024-04-11 00:27:17 +02:00
|
|
|
to
|
|
|
|
}
|
|
|
|
}
|