From 01c02c5258fc5878a6d53c99a77bfde9b1e4617a Mon Sep 17 00:00:00 2001 From: alemi Date: Thu, 2 May 2024 02:58:45 +0200 Subject: [PATCH] feat: impl Addressed on object and activity models --- src/model/activity.rs | 10 ++++++++++ src/model/object.rs | 10 ++++++++++ 2 files changed, 20 insertions(+) diff --git a/src/model/activity.rs b/src/model/activity.rs index ec10c92..3b48cef 100644 --- a/src/model/activity.rs +++ b/src/model/activity.rs @@ -98,3 +98,13 @@ impl Related for Entity { } impl ActiveModelBehavior for ActiveModel {} + +impl apb::target::Addressed for Model { + fn addressed(&self) -> Vec { + let mut to : Vec = 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 + } +} diff --git a/src/model/object.rs b/src/model/object.rs index a08b2ce..0a6a6d4 100644 --- a/src/model/object.rs +++ b/src/model/object.rs @@ -152,3 +152,13 @@ impl Related for Entity { } impl ActiveModelBehavior for ActiveModel {} + +impl apb::target::Addressed for Model { + fn addressed(&self) -> Vec { + let mut to : Vec = 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 + } +}