1
0
Fork 0
forked from alemi/upub

feat: impl Addressed on object and activity models

This commit is contained in:
əlemi 2024-05-02 02:58:45 +02:00
parent eb472517ab
commit 01c02c5258
Signed by: alemi
GPG key ID: A4895B84D311642C
2 changed files with 20 additions and 0 deletions

View file

@ -98,3 +98,13 @@ impl Related<super::addressing::Entity> for Entity {
} }
impl ActiveModelBehavior for ActiveModel {} impl ActiveModelBehavior for ActiveModel {}
impl apb::target::Addressed for Model {
fn addressed(&self) -> Vec<String> {
let mut to : Vec<String> = self.to.0.clone();
to.append(&mut self.bto.0.clone());
to.append(&mut self.cc.0.clone());
to.append(&mut self.bcc.0.clone());
to
}
}

View file

@ -152,3 +152,13 @@ impl Related<super::share::Entity> for Entity {
} }
impl ActiveModelBehavior for ActiveModel {} impl ActiveModelBehavior for ActiveModel {}
impl apb::target::Addressed for Model {
fn addressed(&self) -> Vec<String> {
let mut to : Vec<String> = self.to.0.clone();
to.append(&mut self.bto.0.clone());
to.append(&mut self.cc.0.clone());
to.append(&mut self.bcc.0.clone());
to
}
}