Prepare to add HTTP API to ping cutom jids

[?]
Dec 9, 2020, 6:26 PM
3RMEABMUIPT6DGE6RU6NI7LJ62AUQYKIVU4SA4ZL2P3L4CSGIKEAC

Dependencies

Change contents

  • replacement in src/xmpp/xmpp_connection.rs at line 23
    [2.536][2.536:605]()
    /// Send ping request to the server to test connection
    Ping,
    [2.536]
    [2.605]
    /// Send ping request. By default to the server to test connection.
    Ping {
    opt_xmpp_to: Option<xmpp_parsers::Jid>,
    },
  • replacement in src/xmpp/xmpp_connection.rs at line 757
    [2.24556][2.24556:24616]()
    if (self.xmpp_processing(&event)) {
    [2.24556]
    [2.24616]
    if self.xmpp_processing(&event) {
  • replacement in src/xmpp/xmpp_connection.rs at line 877
    [2.29145][2.29145:29180]()
    XmppCommand::Ping => {
    [2.29145]
    [2.29180]
    XmppCommand::Ping { opt_xmpp_to } => {
  • edit in src/xmpp/xmpp_connection.rs at line 886
    [2.29562]
    [2.29562]
    opt_xmpp_to,
  • replacement in src/xmpp/stanzas.rs at line 113
    [2.35906][2.35906:35971]()
    pub fn make_ping(id: &str, from: xmpp_parsers::Jid) -> Element {
    [2.35906]
    [2.35971]
    pub fn make_ping(id: &str, from: xmpp_parsers::Jid, to: Option<xmpp_parsers::Jid>) -> Element {
  • replacement in src/xmpp/stanzas.rs at line 115
    [2.36009][2.36009:36077]()
    .with_to(Jid::Bare(BareJid::domain(from.clone().domain())))
    [2.36009]
    [2.36077]
    .with_to(to.unwrap_or_else(|| Jid::Bare(BareJid::domain(from.clone().domain()))))
  • replacement in src/main.rs at line 289
    [2.51437][2.51437:51509]()
    cmd_send.clone().send(XmppCommand::Ping).await;
    [2.51437]
    [2.51509]
    cmd_send
    .clone()
    .send(XmppCommand::Ping { opt_xmpp_to: None })
    .await;