DYZPZWNHJUTKWBGJE45DJLUP5WA4IMFSJYWNXYRE3U5HDVTXCEVQC
C6VGR2RWNTZG56XLWTO3P65NQXCMBLDKIAKX6BEIKK2CPNUCNSHAC
ADKJN3JUFLYLQZL4Z4LROV32RYSV5UUICVYUJ3RNQEPRZADK7JSAC
TGO4TIWURN54UFBLMUX4EZTZBG3TE5F4VRL56BTLOINCKJEUDD7QC
55VVNPHUQDPQY2RYYP2ORPYY57ZUBW7EHP3G6JCLC53ZWYG77JHAC
UL67RM6XYS524MP2O2EKZAMQGPDVOQSDZVNCORJUDVEITYG7MRMQC
727YJ2SLVM24UCT6TUTF2TWNBIQ4K424RKRU3GTN4LOBCGS5I6BAC
xmpp_parsers::presence::Type::None => {
if Self::compare_jid_to_full_jid(&presence.to, &self.account.jid) {
if let Some(room) = self
.account
.chatrooms
.values()
.find(|j| presence.from.as_ref().is_some_and(|ref p| p == j))
{
info!(
"Incoming None presence stanza to self from room: {:?}",
presence
);
let payloads: Vec<_> = presence
.payloads
.into_iter()
.filter_map(|x| {
std::convert::TryInto::<xmpp_parsers::muc::MucUser>::try_into(x)
.ok()
})
.collect();
info!("Got MUC user payloads: {:?}", payloads);
self.state.data.pending_mucs.remove(room);
} else {
warn!("Incoming None presence stanza to self: {:?}", presence);
}
} else {
warn!("Incoming None presence stanza: {:?}", presence);
}
}
})
});
let timeouted: Vec<jid::FullJid> = self
.state
.data
.pending_mucs
.iter()
.filter_map(|(jid, data)| {
if now >= data.sent + data.timeout {
warn!(
"MUC Timeout for {} was {:?} expected {:?}",
jid,
now - data.sent,
data.timeout
);
Some(jid.clone())
} else {
None
}
})
.collect();
timeouted.into_iter().for_each(|jid| {
if self.state.data.pending_mucs.remove(&jid).is_some() {
self.state.data.counter += 1;
let id_muc_presence = format!(
"id_muc_presence_enter_mucs_error{}",
self.state.data.counter
);
let muc_presence = stanzas::make_muc_presence(
&id_muc_presence,
self.account.jid.clone(),
jid.clone(),
None,
None,
);
self.state
.data
.pending_mucs
.insert(jid.clone(), MucWait::new(60));
self.state.data.send_queue.push_back(muc_presence);
}
});