Skip to content

Commit

Permalink
work around xmpp-parsers bug: https://gitlab.com/xmpp-rs/xmpp-rs/-/is…
Browse files Browse the repository at this point in the history
  • Loading branch information
jbg committed Jun 17, 2023
1 parent 383025a commit a42e069
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion lib-gst-meet/src/conference.rs
Original file line number Diff line number Diff line change
Expand Up @@ -923,11 +923,17 @@ impl StanzaFilter for JitsiConference {
.find(|e| e.is("nick", ns::NICK))
.map(|e| Nick::try_from(e.clone()))
.transpose()?;
if let Some(muc_user_payload) = presence
if let Some(mut muc_user_payload) = presence
.payloads
.into_iter()
.find(|e| e.is("x", ns::MUC_USER))
{
// Hack until https://gitlab.com/xmpp-rs/xmpp-rs/-/issues/88 is resolved
// We're not interested in the actor element, and xmpp-parsers fails to parse it, so just remove it.
for item in muc_user_payload.children_mut().filter(|child| child.name() == "item") {
while item.remove_child("actor", ns::MUC_USER).is_some() {}
}

let muc_user = MucUser::try_from(muc_user_payload)?;
for item in muc_user.items {
if let Some(jid) = &item.jid {
Expand Down

0 comments on commit a42e069

Please sign in to comment.