Add constructor to filter subscription

This commit is contained in:
Daniel Sanchez Quiros 2022-12-21 14:07:37 +01:00
parent b26eb9b22e
commit 9a79271454
1 changed files with 7 additions and 0 deletions

View File

@ -209,6 +209,13 @@ pub struct FilterSubscription {
} }
impl FilterSubscription { impl FilterSubscription {
pub fn new(content_filters: Vec<ContentFilter>, pubsub_topic: Option<WakuPubSubTopic>) -> Self {
Self {
content_filters,
pubsub_topic,
}
}
pub fn content_filters(&self) -> &[ContentFilter] { pub fn content_filters(&self) -> &[ContentFilter] {
&self.content_filters &self.content_filters
} }