From 9a7927145488ae51fea17193a3bf4a47d1bd7c18 Mon Sep 17 00:00:00 2001 From: Daniel Sanchez Quiros Date: Wed, 21 Dec 2022 14:07:37 +0100 Subject: [PATCH] Add constructor to filter subscription --- waku-bindings/src/general/mod.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/waku-bindings/src/general/mod.rs b/waku-bindings/src/general/mod.rs index 4c54dda..8b93c14 100644 --- a/waku-bindings/src/general/mod.rs +++ b/waku-bindings/src/general/mod.rs @@ -209,6 +209,13 @@ pub struct FilterSubscription { } impl FilterSubscription { + pub fn new(content_filters: Vec, pubsub_topic: Option) -> Self { + Self { + content_filters, + pubsub_topic, + } + } + pub fn content_filters(&self) -> &[ContentFilter] { &self.content_filters }