Add dummy roster data

[?]
Dec 31, 2018, 6:35 PM
UWY5EVZ6AGIMH3OGHECQPK2WNT3MCDIQZRFB4TSBFBAVGVVD3MRQC

Dependencies

  • [2] OANBCLN5 Move xmpp client into XmppState
  • [3] XGP44R5H Rework stopping xmpp connection
  • [4] HU3NZX5Z Process self-presence via new processing code
  • [5] PVCRPP3B Some servers don't send to in initial presence
  • [6] H7R7Y3FQ Use new processing code to wait online
  • [7] AYQZ2UIA Update deps
  • [8] ALP2YJIU Rename XmppState to XmppProcessState
  • [9] 5IKA4GO7 Rename xmpp client field from "inner" to "client"
  • [10] IK3YDPTY Update deps
  • [11] 4LRBIGVT Show info about xmpp errors
  • [*] VS6AHRWI Move XMPP to separate dir
  • [*] QWE26TMV update deps
  • [*] FV6BJ5K6 Send self-presence and store account info in Rc so it willbe used in some future in parallel

Change contents

  • edit in src/xmpp/mod.rs at line 7
    [14.48]
    [15.420]
    use std::collections::HashMap;
  • edit in src/xmpp/mod.rs at line 16
    [2.360]
    [2.360]
    roster: HashMap<jid::Jid, ()>,
  • replacement in src/xmpp/mod.rs at line 82
    [3.435][2.999:1072]()
    state: XmppState { client },
    [3.435]
    [3.494]
    state: XmppState {
    client,
    roster: HashMap::new(),
    },
  • replacement in src/xmpp/mod.rs at line 146
    [3.4612][2.1876:3111]()
    let XmppConnection { state, account } = xmpp;
    state
    .client
    .into_future()
    .select2(stop_future)
    .then(|r| match r {
    Ok(Either::A(((event, client), b))) => {
    if let Some(event) = event {
    let mut xmpp = XmppConnection {
    state: XmppState { client },
    account,
    };
    xmpp.xmpp_processing(&event);
    match stop_condition(&mut xmpp, event) {
    Ok(true) => {
    future::ok(future::Loop::Break((xmpp, Ok(Either::A(b)))))
    }
    Ok(false) => future::ok(future::Loop::Continue((
    xmpp,
    b,
    stop_condition,
    ))),
    Err(e) => future::err((xmpp.account, Err(e))),
    [3.4612]
    [2.3111]
    let XmppConnection {
    state: XmppState { client, roster },
    account,
    } = xmpp;
    client.into_future().select2(stop_future).then(|r| match r {
    Ok(Either::A(((event, client), b))) => {
    if let Some(event) = event {
    let mut xmpp = XmppConnection {
    state: XmppState { client, roster },
    account,
    };
    xmpp.xmpp_processing(&event);
    match stop_condition(&mut xmpp, event) {
    Ok(true) => {
    future::ok(future::Loop::Break((xmpp, Ok(Either::A(b)))))
    }
    Ok(false) => {
    future::ok(future::Loop::Continue((xmpp, b, stop_condition)))
  • replacement in src/xmpp/mod.rs at line 165
    [2.3145][2.3145:3255]()
    } else {
    future::err((account, Ok(Either::A(b))))
    [2.3145]
    [2.3255]
    Err(e) => future::err((xmpp.account, Err(e))),
  • edit in src/xmpp/mod.rs at line 167
    [2.3285]
    [2.3285]
    } else {
    future::err((account, Ok(Either::A(b))))
  • replacement in src/xmpp/mod.rs at line 170
    [2.3311][2.3311:3794](),[2.3794][3.1615:1652](),[3.1615][3.1615:1652](),[3.1652][2.3795:3868](),[2.3868][3.5504:5534](),[3.1746][3.5504:5534](),[3.5504][3.5504:5534]()
    Ok(Either::B((t, a))) => {
    if let Some(client) = a.into_inner() {
    future::ok(future::Loop::Break((
    XmppConnection {
    state: XmppState { client },
    account,
    },
    Ok(Either::B(t)),
    )))
    } else {
    future::err((account, Ok(Either::B(t))))
    }
    [2.3311]
    [3.4505]
    }
    Ok(Either::B((t, a))) => {
    if let Some(client) = a.into_inner() {
    future::ok(future::Loop::Break((
    XmppConnection {
    state: XmppState { client, roster },
    account,
    },
    Ok(Either::B(t)),
    )))
    } else {
    future::err((account, Ok(Either::B(t))))
  • replacement in src/xmpp/mod.rs at line 183
    [3.4531][2.3869:4048](),[3.2379][3.4974:5000](),[2.4048][3.4974:5000](),[3.2379][3.4974:5000](),[3.6082][3.4974:5000](),[3.5779][3.4974:5000](),[3.4974][3.4974:5000](),[3.5000][2.4049:4667]()
    Err(Either::A((e, b))) => {
    warn!("XMPP error: {}", e.0);
    future::err((account, Ok(Either::A(b))))
    }
    Err(Either::B((e, a))) => {
    if let Some(client) = a.into_inner() {
    future::ok(future::Loop::Break((
    XmppConnection {
    state: XmppState { client },
    account,
    },
    Err(e.into()),
    )))
    } else {
    future::err((account, Err(e.into())))
    }
    [3.4531]
    [3.5513]
    }
    Err(Either::A((e, b))) => {
    warn!("XMPP error: {}", e.0);
    future::err((account, Ok(Either::A(b))))
    }
    Err(Either::B((e, a))) => {
    if let Some(client) = a.into_inner() {
    future::ok(future::Loop::Break((
    XmppConnection {
    state: XmppState { client, roster },
    account,
    },
    Err(e.into()),
    )))
    } else {
    future::err((account, Err(e.into())))
  • replacement in src/xmpp/mod.rs at line 200
    [3.5539][2.4668:4691]()
    })
    [3.5539]
    [3.5580]
    }
    })
  • replacement in src/xmpp/mod.rs at line 274
    [2.7279][2.7279:7333]()
    let XmppConnection { account, state } = self;
    [2.7279]
    [2.7333]
    let XmppConnection {
    account,
    state: XmppState { client, roster },
    } = self;
  • replacement in src/xmpp/mod.rs at line 284
    [2.7528][2.7528:7562]()
    state
    .client
    [2.7528]
    [2.7562]
    client
  • replacement in src/xmpp/mod.rs at line 292
    [2.7838][2.7838:7887]()
    state: XmppState { client },
    [2.7838]
    [2.7887]
    state: XmppState { client, roster },
  • replacement in src/xmpp/mod.rs at line 320
    [2.8742][2.8742:8796]()
    let XmppConnection { account, state } = self;
    [2.8742]
    [3.10624]
    let XmppConnection {
    account,
    state: XmppState { client, roster },
    } = self;
  • replacement in src/xmpp/mod.rs at line 330
    [2.8851][2.8851:8885]()
    state
    .client
    [2.8851]
    [2.8885]
    client
  • replacement in src/xmpp/mod.rs at line 338
    [2.9157][2.9157:9206]()
    state: XmppState { client },
    [2.9157]
    [2.9206]
    state: XmppState { client, roster },