Messages fixed
[?]
Feb 18, 2019, 5:59 PM
2VZBEEXAPKTQTRCAODELRMBZLTMS6PMMOGPJ6I7VLWJQAQAKJXDQCDependencies
- [2]
YZVEEOYTUpdate dependencies - [3]
IK3YDPTYUpdate deps - [4]
OB3HA2MDUse Client::new_with_jid to parse jid only once - [5]
L3D22A5JPrepare to check incoming presence - [6]
AA2ZWGRLEnter to MUC - [7]
ACXUIS63Update dependecies - [8]
OANBCLN5Move xmpp client into XmppState - [9]
QYY3KRGLUse failure instead Box<dyn Error> - [10]
AYQZ2UIAUpdate deps - [11]
X6L47BHQUse different structure for established xmpp connection - [12]
5IKA4GO7Rename xmpp client field from "inner" to "client" - [13]
RGOSS73UConvert self-presence to xmpp_parser's type - [14]
EOHEZXX3Move request processing to structure - [15]
J7VX56FWToDo - [16]
5OBTKGDLUpdate deps - [17]
QWE26TMVupdate deps - [18]
NDDQQP2PUpdate deps - [19]
OGMBXBKPMove online to XmppConnection - [20]
TDOR5XQUAccept destination - [21]
HU3NZX5ZProcess self-presence via new processing code - [22]
5Y6YJ6UHAdd shutdown function to make actions before offline - [23]
V5HDBSZMUse jid for receiver address - [24]
WBU7UOQWRead chatroom from config - [25]
VS6AHRWIMove XMPP to separate dir - [26]
BWDUANCVSecond part of processing result is only about stop_future - [27]
SYH7UQP6Make xmpp command enum to allow different commands Save subscription ask status. Don't ask if already requested subscription. - [28]
ZI4GJ72VAdd message to xmpp command - [29]
5A5UVGNMMove receiver closing logic out of xmpp processing - [*]
FVVPKFTLInitial commit
Change contents
- replacement in src/xmpp/mod.rs at line 15
roster: HashMap<xmpp_parsers::Jid, (xmpp_parsers::roster::Subscription, Vec<String>)>,roster: HashMap<xmpp_parsers::Jid,(xmpp_parsers::roster::Subscription,xmpp_parsers::roster::Ask,),>, - replacement in src/xmpp/mod.rs at line 24[3.1431]→[3.1431:1542](∅→∅),[3.1431]→[3.1431:1542](∅→∅),[3.1431]→[3.1431:1542](∅→∅),[3.1431]→[3.1431:1542](∅→∅),[3.1431]→[3.1431:1542](∅→∅),[3.1431]→[3.1431:1542](∅→∅),[3.1542]→[3.1066:1140](∅→∅)
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>/// map from id of adding item to roster and jid of item and message textpending_add_roster_ids: HashMap<String, (xmpp_parsers::Jid, String)>,/// map from id of adding item to roster and jid of itempending_add_roster_ids: HashMap<String, xmpp_parsers::Jid>, - replacement in src/xmpp/mod.rs at line 28[3.1684]→[3.1684:1786](∅→∅),[3.1684]→[3.1684:1786](∅→∅),[3.1684]→[3.1684:1786](∅→∅),[3.1684]→[3.1684:1786](∅→∅),[3.1684]→[3.1684:1786](∅→∅)
================================id_init_roster: Option<String>,<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<</// outgoing mailboxoutgoing_mailbox: HashMap<xmpp_parsers::Jid, Vec<String>>, - replacement in src/xmpp/mod.rs at line 160
if let Some((_, (jid, message))) =if let Some((_, jid)) = - replacement in src/xmpp/mod.rs at line 164
info!("Jid {} added to roster", jid);if let Some(ref mut rdata) = self.state.data.roster.get_mut(&jid) {rdata.1.push(message);if self.state.data.roster.contains_key(&jid) {info!("Jid {} updated to roster", jid); - edit in src/xmpp/mod.rs at line 167
info!("Jid {} added in roster", jid); - replacement in src/xmpp/mod.rs at line 169
jid,(xmpp_parsers::roster::Subscription::None, vec![message]),jid.clone(),(xmpp_parsers::roster::Subscription::None,xmpp_parsers::roster::Ask::None,), - replacement in src/xmpp/mod.rs at line 176
// to do send message or subscriptionself.process_jid(&jid); - replacement in src/xmpp/mod.rs at line 194
if !rdata.1.is_empty() {let sub_to = match rdata.0 {xmpp_parsers::roster::Subscription::To => true,xmpp_parsers::roster::Subscription::Both => true,_ => false,};if sub_to {info!("Subscribed to {}", i.jid);let jid = i.jid.clone();self.state.data.send_queue.extend(rdata.1.drain(..).map(|message| {stanzas::make_chat_message(jid.clone(), message)}),)} else {info!("Not subscribed to {}", i.jid);self.state.data.send_queue.push_back(stanzas::make_ask_subscribe(i.jid));}}rdata.1 = i.ask; - replacement in src/xmpp/mod.rs at line 200
.insert(i.jid, (i.subscription, vec![]));.insert(i.jid.clone(), (i.subscription, i.ask)); - edit in src/xmpp/mod.rs at line 202
self.process_jid(&i.jid); - replacement in src/xmpp/mod.rs at line 393
fn process_initial_roster(&mut self, event: Event) -> Result<bool, ()> {fn process_initial_roster(&mut self, event: Event, id_init_roster: &str) -> Result<bool, ()> { - replacement in src/xmpp/mod.rs at line 399
if Some(id) == self.state.data.id_init_roster {if id == id_init_roster { - replacement in src/xmpp/mod.rs at line 417
.insert(i.jid, (i.subscription, vec![]));.insert(i.jid, (i.subscription, i.ask)); - edit in src/xmpp/mod.rs at line 465
data.id_init_roster = Some(id_init_roster); - replacement in src/xmpp/mod.rs at line 479
.processing(XmppConnection::process_initial_roster, stop_future).processing(move |conn, event| conn.process_initial_roster(event, &id_init_roster),stop_future,) - edit in src/xmpp/mod.rs at line 548
fn process_jid(&mut self, xmpp_to: &xmpp_parsers::Jid) {if let Some(ref mut mailbox) = self.state.data.outgoing_mailbox.get_mut(xmpp_to) {if !mailbox.is_empty() {if let Some(ref mut rdata) = self.state.data.roster.get_mut(xmpp_to) {info!("Jid {} in roster", xmpp_to);let sub_to = match rdata.0 {xmpp_parsers::roster::Subscription::To => true,xmpp_parsers::roster::Subscription::Both => true,_ => false,};if sub_to {info!("Subscribed to {}", xmpp_to);self.state.data.send_queue.extend(mailbox.drain(..).map(|message| {stanzas::make_chat_message(xmpp_to.clone(), message)}),);} else if rdata.1 == xmpp_parsers::roster::Ask::None {info!("Not subscribed to {}", xmpp_to);self.state.data.send_queue.push_back(stanzas::make_ask_subscribe(xmpp_to.clone()));}} else {info!("Jid {} not in roster", xmpp_to);self.state.data.counter += 1;let id_add_roster = format!("id_add_roster{}", self.state.data.counter);let add_roster = stanzas::make_add_roster(&id_add_roster, xmpp_to.clone());self.state.data.pending_add_roster_ids.insert(id_add_roster, xmpp_to.clone());info!("Adding jid to roster... {:?}", add_roster);self.state.data.send_queue.push_back(add_roster);}}}} - replacement in src/xmpp/mod.rs at line 592[3.21716]→[3.11511:11595](∅→∅),[3.11595]→[3.2920:2972](∅→∅),[3.2920]→[3.2920:2972](∅→∅),[3.2972]→[3.11596:12185](∅→∅)
if let Some(ref mut rdata) = self.state.data.roster.get_mut(&cmd.xmpp_to) {info!("Jid {} in roster", cmd.xmpp_to);let sub_to = match rdata.0 {xmpp_parsers::roster::Subscription::To => true,xmpp_parsers::roster::Subscription::Both => true,_ => false,};if sub_to {info!("Subscribed to {}", cmd.xmpp_to);self.state.data.send_queue.push_back(stanzas::make_chat_message(cmd.xmpp_to, cmd.message));} else {info!("Not subscribed to {}", cmd.xmpp_to);rdata.1.push(cmd.message);match cmd {XmppCommand::Chat { xmpp_to, message } => { - replacement in src/xmpp/mod.rs at line 596
.send_queue.push_back(stanzas::make_ask_subscribe(cmd.xmpp_to));.outgoing_mailbox.entry(xmpp_to.clone()).or_default().push(message);self.process_jid(&xmpp_to); - edit in src/xmpp/mod.rs at line 602[3.12358]→[3.2972:3045](∅→∅),[3.2972]→[3.2972:3045](∅→∅),[3.4709]→[3.22687:22688](∅→∅),[3.3045]→[3.22687:22688](∅→∅),[3.22687]→[3.22687:22688](∅→∅),[3.22688]→[3.3046:3481](∅→∅),[3.5197]→[3.23123:23124](∅→∅),[3.3481]→[3.23123:23124](∅→∅),[3.23123]→[3.23123:23124](∅→∅),[3.23124]→[3.3482:3544](∅→∅)
} else {info!("Jid {} not in roster", cmd.xmpp_to);self.state.data.counter += 1;let id_add_roster = format!("id_add_roster{}", self.state.data.counter);let add_roster = stanzas::make_add_roster(&id_add_roster, cmd.xmpp_to.clone());self.state.data.pending_add_roster_ids.insert(id_add_roster, (cmd.xmpp_to, cmd.message));info!("Adding jid to roster... {:?}", add_roster);self.state.data.send_queue.push_back(add_roster); - replacement in src/xmpp/mod.rs at line 652
pub struct XmppCommand {pub xmpp_to: xmpp_parsers::Jid,pub message: String,pub enum XmppCommand {Chat {xmpp_to: xmpp_parsers::Jid,message: String,}, - replacement in src/main.rs at line 90
.send(XmppCommand { xmpp_to, message }).send(XmppCommand::Chat { xmpp_to, message }) - replacement in Cargo.lock at line 10
version = "0.6.10"version = "0.6.9" - replacement in Cargo.lock at line 13
"memchr 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)","memchr 2.1.3 (registry+https://github.com/rust-lang/crates.io-index)", - replacement in Cargo.lock at line 100
version = "0.7.0"version = "0.7.2" - replacement in Cargo.lock at line 211
"num_cpus 1.10.0 (registry+https://github.com/rust-lang/crates.io-index)","num_cpus 1.9.0 (registry+https://github.com/rust-lang/crates.io-index)", - replacement in Cargo.lock at line 221
"smallvec 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)","smallvec 0.6.8 (registry+https://github.com/rust-lang/crates.io-index)", - replacement in Cargo.lock at line 284
version = "0.8.16"version = "0.8.15" - replacement in Cargo.lock at line 378
"new_debug_unreachable 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)","new_debug_unreachable 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", - replacement in Cargo.lock at line 392
"num_cpus 1.10.0 (registry+https://github.com/rust-lang/crates.io-index)","num_cpus 1.9.0 (registry+https://github.com/rust-lang/crates.io-index)", - replacement in Cargo.lock at line 463
version = "0.12.24"version = "0.12.23" - replacement in Cargo.lock at line 609
"serde 1.0.88 (registry+https://github.com/rust-lang/crates.io-index)","serde_derive 1.0.88 (registry+https://github.com/rust-lang/crates.io-index)","serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)","serde_derive 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", - replacement in Cargo.lock at line 624
version = "2.2.0"version = "2.1.3" - edit in Cargo.lock at line 626
dependencies = ["cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)","libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)",] - replacement in Cargo.lock at line 699
"tempfile 3.0.7 (registry+https://github.com/rust-lang/crates.io-index)","tempfile 3.0.6 (registry+https://github.com/rust-lang/crates.io-index)", - replacement in Cargo.lock at line 714
version = "1.0.2"version = "1.0.1" - edit in Cargo.lock at line 716
dependencies = ["unreachable 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",] - replacement in Cargo.lock at line 740
version = "1.10.0"version = "1.9.0" - replacement in Cargo.lock at line 805
"smallvec 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)","smallvec 0.6.8 (registry+https://github.com/rust-lang/crates.io-index)", - replacement in Cargo.lock at line 885
"encoding_rs 0.8.16 (registry+https://github.com/rust-lang/crates.io-index)","encoding_rs 0.8.15 (registry+https://github.com/rust-lang/crates.io-index)", - replacement in Cargo.lock at line 888
"memchr 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)","memchr 2.1.3 (registry+https://github.com/rust-lang/crates.io-index)", - replacement in Cargo.lock at line 1038
"aho-corasick 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)","memchr 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)","aho-corasick 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)","memchr 2.1.3 (registry+https://github.com/rust-lang/crates.io-index)", - replacement in Cargo.lock at line 1156
"hyper 0.12.24 (registry+https://github.com/rust-lang/crates.io-index)","hyper 0.12.23 (registry+https://github.com/rust-lang/crates.io-index)", - replacement in Cargo.lock at line 1159
"serde 1.0.88 (registry+https://github.com/rust-lang/crates.io-index)","serde_derive 1.0.88 (registry+https://github.com/rust-lang/crates.io-index)","serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)","serde_derive 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", - replacement in Cargo.lock at line 1172
version = "1.0.88"version = "1.0.87" - replacement in Cargo.lock at line 1177
version = "1.0.88"version = "1.0.87" - replacement in Cargo.lock at line 1192
"serde 1.0.88 (registry+https://github.com/rust-lang/crates.io-index)","serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", - replacement in Cargo.lock at line 1200
"block-buffer 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)","block-buffer 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", - replacement in Cargo.lock at line 1211
"block-buffer 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)","block-buffer 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", - replacement in Cargo.lock at line 1222
"block-buffer 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)","block-buffer 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", - replacement in Cargo.lock at line 1250
version = "0.6.9"version = "0.6.8" - edit in Cargo.lock at line 1252
dependencies = ["unreachable 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",] - replacement in Cargo.lock at line 1283
"new_debug_unreachable 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)","new_debug_unreachable 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", - replacement in Cargo.lock at line 1286
"serde 1.0.88 (registry+https://github.com/rust-lang/crates.io-index)","serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", - replacement in Cargo.lock at line 1359
version = "3.0.7"version = "3.0.6" - replacement in Cargo.lock at line 1432
"num_cpus 1.10.0 (registry+https://github.com/rust-lang/crates.io-index)","num_cpus 1.9.0 (registry+https://github.com/rust-lang/crates.io-index)", - replacement in Cargo.lock at line 1513
"num_cpus 1.10.0 (registry+https://github.com/rust-lang/crates.io-index)","num_cpus 1.9.0 (registry+https://github.com/rust-lang/crates.io-index)", - replacement in Cargo.lock at line 1568
"num_cpus 1.10.0 (registry+https://github.com/rust-lang/crates.io-index)","num_cpus 1.9.0 (registry+https://github.com/rust-lang/crates.io-index)", - replacement in Cargo.lock at line 1653
"serde 1.0.88 (registry+https://github.com/rust-lang/crates.io-index)","serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", - replacement in Cargo.lock at line 1668
"smallvec 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)","smallvec 0.6.8 (registry+https://github.com/rust-lang/crates.io-index)", - replacement in Cargo.lock at line 1692
"smallvec 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)","smallvec 0.6.8 (registry+https://github.com/rust-lang/crates.io-index)", - replacement in Cargo.lock at line 1733
"smallvec 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)","smallvec 0.6.8 (registry+https://github.com/rust-lang/crates.io-index)", - edit in Cargo.lock at line 1752
name = "unreachable"version = "1.0.0"source = "registry+https://github.com/rust-lang/crates.io-index"dependencies = ["void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)",][[package]] - edit in Cargo.lock at line 1787
source = "registry+https://github.com/rust-lang/crates.io-index"[[package]]name = "void"version = "1.0.2" - replacement in Cargo.lock at line 1910
"checksum aho-corasick 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)" = "81ce3d38065e618af2d7b77e10c5ad9a069859b4be3c2250f674af3840d9c8a5""checksum aho-corasick 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)" = "1e9a933f4e58658d7b12defcf96dc5c720f20832deebe3e0a19efd3b6aaeeb9e" - replacement in Cargo.lock at line 1921
"checksum block-buffer 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "49665c62e0e700857531fa5d3763e91b539ff1abeebd56808d378b495870d60d""checksum block-buffer 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)" = "509de513cca6d92b6aacf9c61acfe7eaa160837323a81068d690cc1f8e5740da" - replacement in Cargo.lock at line 1942
"checksum encoding_rs 0.8.16 (registry+https://github.com/rust-lang/crates.io-index)" = "0535f350c60aac0b87ccf28319abc749391e912192255b0c00a2c12c6917bd73""checksum encoding_rs 0.8.15 (registry+https://github.com/rust-lang/crates.io-index)" = "fd251508d65030820f3a4317af2248180db337fdb25d89967956242580277813" - replacement in Cargo.lock at line 1964
"checksum hyper 0.12.24 (registry+https://github.com/rust-lang/crates.io-index)" = "fdfa9b401ef6c4229745bb6e9b2529192d07b920eed624cdee2a82348cd550af""checksum hyper 0.12.23 (registry+https://github.com/rust-lang/crates.io-index)" = "860faf61a9957c9cb0e23e69f1c8290e92f6eb660fcdd1f2d6777043a2ae1a46" - replacement in Cargo.lock at line 1983
"checksum memchr 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2efc7bc57c883d4a4d6e3246905283d8dae951bb3bd32f49d6ef297f546e1c39""checksum memchr 2.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "e1dd4eaac298c32ce07eb6ed9242eda7d82955b9170b7d6db59b2e02cc63fcb8" - replacement in Cargo.lock at line 1991
"checksum new_debug_unreachable 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "fe2deb65e9f08f6540e6766481b9dc3a36e73d2fdb96e82bc3cd56353fafe90a""checksum new_debug_unreachable 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0cdc457076c78ab54d5e0d6fa7c47981757f1e34dc39ff92787f217dede586c4" - replacement in Cargo.lock at line 1995
"checksum num_cpus 1.10.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1a23f0ed30a54abaa0c7e83b1d2d87ada7c3c23078d1d87815af3e3b6385fbba""checksum num_cpus 1.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5a69d464bdc213aaaff628444e99578ede64e9c854025aa43b9796530afa9238" - replacement in Cargo.lock at line 2044
"checksum serde 1.0.88 (registry+https://github.com/rust-lang/crates.io-index)" = "9f301d728f2b94c9a7691c90f07b0b4e8a4517181d9461be94c04bddeb4bd850""checksum serde_derive 1.0.88 (registry+https://github.com/rust-lang/crates.io-index)" = "beed18e6f5175aef3ba670e57c60ef3b1b74d250d962a26604bff4c80e970dd4""checksum serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)" = "2e20fde37801e83c891a2dc4ebd3b81f0da4d1fb67a9e0a2a3b921e2536a58ee""checksum serde_derive 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)" = "633e97856567e518b59ffb2ad7c7a4fd4c5d91d9c7f32dd38a27b2bf7e8114ea" - replacement in Cargo.lock at line 2053
"checksum smallvec 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)" = "c4488ae950c49d403731982257768f48fada354a5203fe81f9bb6f43ca9002be""checksum smallvec 0.6.8 (registry+https://github.com/rust-lang/crates.io-index)" = "88aea073965ab29f6edb5493faf96ad662fb18aa9eeb186a3b7057951605ed15" - replacement in Cargo.lock at line 2066
"checksum tempfile 3.0.7 (registry+https://github.com/rust-lang/crates.io-index)" = "b86c784c88d98c801132806dadd3819ed29d8600836c4088e855cdf3e178ed8a""checksum tempfile 3.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "37daa55a7240c4931c84559f03b3cad7d19535840d1c4a0cc4e9b2fb0dcf70ff" - edit in Cargo.lock at line 2102
"checksum unreachable 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "382810877fe448991dfc7f0dd6e3ae5d58088fd0ea5e35189655f84e6814fa56" - edit in Cargo.lock at line 2108
"checksum void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d"