xmpp: Adapt to xmpp-parsers changes wrt autojoin
This attribute is now a simple bool instead of an enum.
This commit is contained in:
parent
866991bda5
commit
011585594f
2 changed files with 7 additions and 7 deletions
|
|
@ -12,10 +12,8 @@ use tokio_xmpp::{
|
|||
jid::{BareJid, Jid},
|
||||
minidom::Element,
|
||||
parsers::{
|
||||
bookmarks2::{self, Autojoin},
|
||||
ns,
|
||||
pubsub::event::PubSubEvent,
|
||||
pubsub::pubsub::PubSub,
|
||||
bookmarks2, ns,
|
||||
pubsub::{event::PubSubEvent, pubsub::PubSub},
|
||||
},
|
||||
};
|
||||
|
||||
|
|
@ -47,7 +45,7 @@ pub(crate) async fn handle_event<C: ServerConnector>(
|
|||
let payload = item.payload.clone().unwrap();
|
||||
match bookmarks2::Conference::try_from(payload) {
|
||||
Ok(conference) => {
|
||||
if conference.autojoin == Autojoin::True {
|
||||
if conference.autojoin {
|
||||
events.push(Event::JoinRoom(jid, conference));
|
||||
} else {
|
||||
events.push(Event::LeaveRoom(jid));
|
||||
|
|
@ -110,7 +108,7 @@ pub(crate) fn handle_iq_result(
|
|||
let payload = item.payload.clone().unwrap();
|
||||
match bookmarks2::Conference::try_from(payload) {
|
||||
Ok(conference) => {
|
||||
if let Autojoin::True = conference.autojoin {
|
||||
if conference.autojoin {
|
||||
events.push(Event::JoinRoom(jid, conference));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue