Add constructor to filter subscription (#34)

This commit is contained in:
Daniel Sanchez 2022-12-21 15:27:07 +01:00 committed by GitHub
parent b26eb9b22e
commit d4136fd72b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 0 deletions

View File

@ -209,6 +209,13 @@ pub struct 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] {
&self.content_filters
}