Session::filter_presence: block muc#admin; add TODO

Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
This commit is contained in:
Maxime “pep” Buquet 2022-12-27 09:40:35 +01:00
parent c159f0b735
commit ce640864ca
Signed by: pep
GPG key ID: DEDA74AEECA9D0F2

View file

@ -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"))
});