client: use stanzastream!
This commit is contained in:
parent
80f899daa0
commit
35ce86243f
29 changed files with 238 additions and 565 deletions
|
|
@ -4,7 +4,6 @@
|
|||
// License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
use tokio_xmpp::connect::ServerConnector;
|
||||
use tokio_xmpp::{
|
||||
jid::Jid,
|
||||
minidom::Element,
|
||||
|
|
@ -18,8 +17,8 @@ use tokio_xmpp::{
|
|||
|
||||
use crate::{Agent, Event};
|
||||
|
||||
pub async fn handle_iq_get<C: ServerConnector>(
|
||||
agent: &mut Agent<C>,
|
||||
pub async fn handle_iq_get(
|
||||
agent: &mut Agent,
|
||||
_events: &mut Vec<Event>,
|
||||
from: Jid,
|
||||
_to: Option<Jid>,
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@
|
|||
// License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
use tokio_xmpp::connect::ServerConnector;
|
||||
use tokio_xmpp::parsers::iq::{Iq, IqType};
|
||||
|
||||
use crate::{Agent, Event};
|
||||
|
|
@ -13,7 +12,7 @@ pub mod get;
|
|||
pub mod result;
|
||||
pub mod set;
|
||||
|
||||
pub async fn handle_iq<C: ServerConnector>(agent: &mut Agent<C>, iq: Iq) -> Vec<Event> {
|
||||
pub async fn handle_iq(agent: &mut Agent, iq: Iq) -> Vec<Event> {
|
||||
let mut events = vec![];
|
||||
let from = iq
|
||||
.from
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@
|
|||
// License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
use tokio_xmpp::connect::ServerConnector;
|
||||
use tokio_xmpp::{
|
||||
jid::Jid,
|
||||
minidom::Element,
|
||||
|
|
@ -13,8 +12,8 @@ use tokio_xmpp::{
|
|||
|
||||
use crate::{disco, muc::room::JoinRoomSettings, pubsub, upload, Agent, Event};
|
||||
|
||||
pub async fn handle_iq_result<C: ServerConnector>(
|
||||
agent: &mut Agent<C>,
|
||||
pub async fn handle_iq_result(
|
||||
agent: &mut Agent,
|
||||
events: &mut Vec<Event>,
|
||||
from: Jid,
|
||||
_to: Option<Jid>,
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@
|
|||
// License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
use tokio_xmpp::connect::ServerConnector;
|
||||
use tokio_xmpp::{
|
||||
jid::Jid,
|
||||
minidom::Element,
|
||||
|
|
@ -16,8 +15,8 @@ use tokio_xmpp::{
|
|||
|
||||
use crate::{Agent, Event};
|
||||
|
||||
pub async fn handle_iq_set<C: ServerConnector>(
|
||||
agent: &mut Agent<C>,
|
||||
pub async fn handle_iq_set(
|
||||
agent: &mut Agent,
|
||||
_events: &mut Vec<Event>,
|
||||
from: Jid,
|
||||
_to: Option<Jid>,
|
||||
|
|
|
|||
Loading…
Reference in a new issue