From ebf096488bc338f67c5ddffb07dffe3d88d00f3e Mon Sep 17 00:00:00 2001 From: Paul Fariello Date: Wed, 28 Oct 2020 11:08:41 +0100 Subject: [PATCH] Add missing Subscribe element in PubSub enum --- xmpp-parsers/src/pubsub/pubsub.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/xmpp-parsers/src/pubsub/pubsub.rs b/xmpp-parsers/src/pubsub/pubsub.rs index 458dba7d..2066d466 100644 --- a/xmpp-parsers/src/pubsub/pubsub.rs +++ b/xmpp-parsers/src/pubsub/pubsub.rs @@ -321,6 +321,9 @@ pub enum PubSub { /// A request for current subscriptions. Subscriptions(Subscriptions), + /// A subcribe request. + Subscribe(Subscribe), + /// An unsubscribe request. Unsubscribe(Unsubscribe), } @@ -486,6 +489,7 @@ impl From for Element { PubSub::Retract(retract) => vec![Element::from(retract)], PubSub::Subscription(subscription) => vec![Element::from(subscription)], PubSub::Subscriptions(subscriptions) => vec![Element::from(subscriptions)], + PubSub::Subscribe(subscribe) => vec![Element::from(subscribe)], PubSub::Unsubscribe(unsubscribe) => vec![Element::from(unsubscribe)], }) .build()