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CQRZ6QC 5OBTKGDLRGZ4K4373CVGBF53LRECXQ7OW45PW43MJLBU622OKMTQC V5HDBSZM7GHPKTQAVSOXVF6UTSQTXSU3SJFWL7CIBFNBLJ4Q4V6QC NDDQQP2PSYH5YNU5EHFRUFACLJURWAHFZQNOIQNJCWHRSB7A3N6QC EOHEZXX3TBKGJTOMXEPAPHLAJSATRXNY4AIL63BE4VG3HFNWARVQC 5IKA4GO7DIMBBYB7OUF5S7N2LUWIZ5MKCCCTZCAYPZI2357MVFHAC DISBBP3IQHP5YL654247RYGOB3KGEF5TG62HZTYLMZBGDTVNV7ZAC ZI4GJ72VMCBV6EQAO4PIKCGXV6ASUYOTGPRVSIGCKDBCDNRQNUFAC let mut add_roster = Iq::from_set(Roster {items: vec![Item {jid,name: None,subscription: xmpp_parsers::roster::Subscription::None,ask: xmpp_parsers::roster::Ask::None,groups: vec![],}],ver: None,});add_roster.id = Some(id.to_string());add_roster.into()
Iq::from_set(id,Roster {items: vec![Item {jid,name: None,subscription: xmpp_parsers::roster::Subscription::None,ask: xmpp_parsers::roster::Ask::None,groups: vec![],}],ver: None,},).into()
pub fn make_pong(id: Option<String>,from: xmpp_parsers::Jid,to: Option<xmpp_parsers::Jid>,) -> Element {let mut pong = Iq::from_result(None as Option<Roster>);pong.id = id;
pub fn make_pong(id: &str, from: xmpp_parsers::Jid, to: Option<xmpp_parsers::Jid>) -> Element {let mut pong = Iq::from_result(id, None as Option<Roster>);
if let Some(id) = iq.id.clone() {if let Some((_, jid)) =self.state.data.pending_add_roster_ids.remove_entry(&id){if let xmpp_parsers::iq::IqType::Result(None) = iq.payload {if self.state.data.roster.contains_key(&jid) {info!("Jid {} updated to roster", jid);} else {info!("Jid {} added in roster", jid);self.state.data.roster.insert(jid.clone(),(xmpp_parsers::roster::Subscription::None,xmpp_parsers::roster::Ask::None,),);}self.process_jid(&jid);
if let Some((_, jid)) =self.state.data.pending_add_roster_ids.remove_entry(&iq.id){if let xmpp_parsers::iq::IqType::Result(None) = iq.payload {if self.state.data.roster.contains_key(&jid) {info!("Jid {} updated to roster", jid);
warn!("Wrong payload when adding {} to roster: {:?}",jid, iq.payload
info!("Jid {} added in roster", jid);self.state.data.roster.insert(jid.clone(),(xmpp_parsers::roster::Subscription::None,xmpp_parsers::roster::Ask::None,),
if let Some(id) = iq.id {if id == id_init_roster {match iq.payload {xmpp_parsers::iq::IqType::Error(_e) => {error!("Get error instead of roster");Err(())}xmpp_parsers::iq::IqType::Result(Some(result)) => {match result.try_into()as Result<xmpp_parsers::roster::Roster, _>{Ok(roster) => {self.state.data.roster.clear();info!("Got first roster:");for i in roster.items {info!(" >>> {:?}", i);self.state.data.roster.insert(i.jid, (i.subscription, i.ask));}Ok(true)
if iq.id == id_init_roster {match iq.payload {xmpp_parsers::iq::IqType::Error(_e) => {error!("Get error instead of roster");Err(())}xmpp_parsers::iq::IqType::Result(Some(result)) => {match result.try_into() as Result<xmpp_parsers::roster::Roster, _> {Ok(roster) => {self.state.data.roster.clear();info!("Got first roster:");for i in roster.items {info!(" >>> {:?}", i);self.state.data.roster.insert(i.jid, (i.subscription, i.ask));
Err(e) => {error!("Cann't parse roster: {}", e);Err(())}
Ok(true)}Err(e) => {error!("Cann't parse roster: {}", e);Err(())
_ => {error!("Unknown result of roster");Err(())}
}_ => {error!("Unknown result of roster");Err(())
toml = "0.4"
toml = "0.5"
"cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)","libc 0.2.49 (registry+https://github.com/rust-lang/crates.io-index)",
"cfg-if 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)","libc 0.2.50 (registry+https://github.com/rust-lang/crates.io-index)",
"cc 1.0.30 (registry+https://github.com/rust-lang/crates.io-index)","libc 0.2.49 (registry+https://github.com/rust-lang/crates.io-index)",
"cc 1.0.31 (registry+https://github.com/rust-lang/crates.io-index)","libc 0.2.50 (registry+https://github.com/rust-lang/crates.io-index)",
version = "0.4.2"
version = "0.5.2"
"cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)","libc 0.2.49 (registry+https://github.com/rust-lang/crates.io-index)",
"cfg-if 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)","libc 0.2.50 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.49 (registry+https://github.com/rust-lang/crates.io-index)","openssl-sys 0.9.42 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.50 (registry+https://github.com/rust-lang/crates.io-index)","openssl-sys 0.9.43 (registry+https://github.com/rust-lang/crates.io-index)",
"cc 1.0.30 (registry+https://github.com/rust-lang/crates.io-index)","libc 0.2.49 (registry+https://github.com/rust-lang/crates.io-index)",
"cc 1.0.31 (registry+https://github.com/rust-lang/crates.io-index)","libc 0.2.50 (registry+https://github.com/rust-lang/crates.io-index)",
"cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)","libc 0.2.49 (registry+https://github.com/rust-lang/crates.io-index)",
"cfg-if 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)","libc 0.2.50 (registry+https://github.com/rust-lang/crates.io-index)",
"cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)","libc 0.2.49 (registry+https://github.com/rust-lang/crates.io-index)",
"cfg-if 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)","libc 0.2.50 (registry+https://github.com/rust-lang/crates.io-index)",
[[package]]name = "xmpp-parsers"version = "0.13.0"source = "registry+https://github.com/rust-lang/crates.io-index"dependencies = ["base64 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)","blake2 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)","chrono 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)","digest 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)","jid 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)","minidom 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)","sha-1 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)","sha2 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)","sha3 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)","try_from 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)",]
"checksum bytes 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)" = "40ade3d27603c2cb345eb0912aec461a6dec7e06a4ae48589904e808335c7afa"
"checksum bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)" = "206fdffcfa2df7cbe15601ef46c813fce0965eb3286db6b56c583b814b51c81c"
"checksum cc 1.0.30 (registry+https://github.com/rust-lang/crates.io-index)" = "d01c69d08ff207f231f07196e30f84c70f1c815b04f980f8b7b01ff01f05eb92""checksum cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "082bb9b28e00d3c9d39cc03e64ce4cea0f1bb9b3fde493f0cbc008472d22bdf4"
"checksum cc 1.0.31 (registry+https://github.com/rust-lang/crates.io-index)" = "c9ce8bb087aacff865633f0bd5aeaed910fe2fe55b55f4739527f2e023a2e53d""checksum cfg-if 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "11d43355396e872eefb45ce6342e4374ed7bc2b3a502d1b28e36d6e23c05d1f4"
"checksum env_logger 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "afb070faf94c85d17d50ca44f6ad076bce18ae92f0037d350947240a36e9d42e"
"checksum env_logger 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b61fa891024a945da30a9581546e8cfaf5602c7b3f4c137a2805cf388f92075a"
"checksum h2 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)" = "ddb2b25a33e231484694267af28fec74ac63b5ccf51ee2065a5e313b834d836e"
"checksum h2 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)" = "910a5e7be6283a9c91b3982fa5188368c8719cce2a3cf3b86048673bf9d9c36b"
"checksum libc 0.2.49 (registry+https://github.com/rust-lang/crates.io-index)" = "413f3dfc802c5dc91dc570b05125b6cda9855edfaa9825c9849807876376e70e""checksum linked-hash-map 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7860ec297f7008ff7a1e3382d7f7e1dcd69efc94751a2284bafc3d013c2aa939"
"checksum libc 0.2.50 (registry+https://github.com/rust-lang/crates.io-index)" = "aab692d7759f5cd8c859e169db98ae5b52c924add2af5fbbca11d12fefb567c1""checksum linked-hash-map 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "ae91b68aebc4ddb91978b11a1b02ddd8602a05ec19002801c5666000e05e0f83"
"checksum lru-cache 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "4d06ff7ff06f729ce5f4e227876cb88d10bc59cd4ae1e09fbb2bde15c850dc21"
"checksum lru-cache 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "31e24f1ad8321ca0e8a1e0ac13f23cb668e6f5466c2c57319f6a5cf1cc8e3b1c"
"checksum openssl 0.10.19 (registry+https://github.com/rust-lang/crates.io-index)" = "84321fb9004c3bce5611188a644d6171f895fa2889d155927d528782edb21c5d"
"checksum openssl 0.10.20 (registry+https://github.com/rust-lang/crates.io-index)" = "5a0d6b781aac4ac1bd6cafe2a2f0ad8c16ae8e1dd5184822a16c50139f8838d9"
"checksum openssl-sys 0.9.42 (registry+https://github.com/rust-lang/crates.io-index)" = "cb534d752bf98cf363b473950659ac2546517f9c6be9723771614ab3f03bbc9e"
"checksum openssl-sys 0.9.43 (registry+https://github.com/rust-lang/crates.io-index)" = "33c86834957dd5b915623e94f2f4ab2c70dd8f6b70679824155d5ae21dbd495d"
"checksum rand_os 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "b7c690732391ae0abafced5015ffb53656abfaec61b342290e5eb56b286a679d"
"checksum rand_os 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "7b75f676a1e053fc562eafbb47838d67c84801e38fc1ba459e8f180deabd5071"
"checksum syn 0.15.27 (registry+https://github.com/rust-lang/crates.io-index)" = "525bd55255f03c816e5d7f615587bd13030c7103354fadb104993dcee6a788ec"
"checksum syn 0.15.29 (registry+https://github.com/rust-lang/crates.io-index)" = "1825685f977249735d510a242a6727b46efe914bb67e38d30c071b1b72b1d5c2"
"checksum tokio 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)" = "fcaabb3cec70485d0df6e9454fe514393ad1c4070dee8915f11041e95630b230"
"checksum tokio 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)" = "1021bb1f4150435ab8f222eb7ed37c60b2d57037def63ba43085a79f387512d7"
"checksum tokio-sync 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "1bf2b9dac2a0509b5cfd1df5aa25eafacb616a42a491a13604d6bbeab4486363"
"checksum tokio-sync 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "fda385df506bf7546e70872767f71e81640f1f251bdf2fd8eb81a0eaec5fe022"
"checksum toml 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)" = "758664fc71a3a69038656bee8b6be6477d2a6c315a6b81f7081f591bffa4111f"
"checksum toml 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "87c5890a989fa47ecdc7bcb4c63a77a82c18f306714104b1decfd722db17b39e"
"checksum xmpp-parsers 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c467bb13e01718be793cb7a1c3d38d0e9ba45898db306aa43e70657a8aa3c2f2"