commit 8ef4b9c26145572ad7543d955778499e84723099
parent c870c70e988fffbdd10f161d97add8bd919db25a
Author: William Casarin <jb55@jb55.com>
Date: Tue, 16 Jul 2024 09:55:49 -0700
filter: Add event method
Signed-off-by: William Casarin <jb55@jb55.com>
Diffstat:
1 file changed, 7 insertions(+), 0 deletions(-)
diff --git a/src/filter.rs b/src/filter.rs
@@ -187,6 +187,13 @@ impl FilterBuilder {
self
}
+ pub fn event(&mut self, id: &[u8; 32]) -> &mut Self {
+ self.start_tag_field('e');
+ self.add_id_element(id);
+ self.end_field();
+ self
+ }
+
pub fn ids(&mut self, ids: Vec<[u8; 32]>) -> &mut Self {
self.start_ids_field();
for ref id in ids {