From ce640864cae80f4456ac67c0914e745a8215f658 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maxime=20=E2=80=9Cpep=E2=80=9D=20Buquet?= Date: Tue, 27 Dec 2022 09:40:35 +0100 Subject: [PATCH] Session::filter_presence: block muc#admin; add TODO MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Maxime “pep” Buquet --- src/session.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/session.rs b/src/session.rs index bd2a182..991bd5a 100644 --- a/src/session.rs +++ b/src/session.rs @@ -32,9 +32,12 @@ impl Session { presence.payloads.retain(|payload| { // TODO: Add a ::is_a method in xmpp-parsers which takes a ref to avoid having to // clone, and use this instead. + // TODO: This method will require knowledge of the domain it's been attributed to be + // able to strip payloads which use it (e.g., delay, stanza-id). // TODO: Finish this list !(Element::is(payload, "x", "http://jabber.org/protocol/muc") || Element::is(payload, "x", "http://jabber.org/protocol/muc#user") + || Element::is(payload, "x", "http://jabber.org/protocol/muc#admin") || Element::is(payload, "x", "http://jabber.org/protocol/muc#owner") || Element::is(payload, "occupant-id", "urn:xmpp:occupant-id:0")) });