From 8be106a4c0b7ae2ddfe91b796669488db8e38c1f Mon Sep 17 00:00:00 2001 From: Guillaume Desmottes Date: Tue, 11 Sep 2012 14:03:58 +0200 Subject: [PATCH] event-manager: use empathy_sasl_channel_supports_mechanism() There is no point re-implementing it. --- src/empathy-event-manager.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/src/empathy-event-manager.c b/src/empathy-event-manager.c index c4d2e09a..7e34f4ce 100644 --- a/src/empathy-event-manager.c +++ b/src/empathy-event-manager.c @@ -34,6 +34,7 @@ #include #include #include +#include #include @@ -966,15 +967,7 @@ approve_sasl_channel (EmpathyEventManager *self, TpAddDispatchOperationContext *context, TpChannel *channel) { - GHashTable *props; - const gchar * const *available_mechanisms; - - props = tp_channel_borrow_immutable_properties (channel); - available_mechanisms = tp_asv_get_boxed (props, - TP_PROP_CHANNEL_INTERFACE_SASL_AUTHENTICATION_AVAILABLE_MECHANISMS, - G_TYPE_STRV); - - if (tp_strv_contains (available_mechanisms, "X-TELEPATHY-PASSWORD")) + if (empathy_sasl_channel_supports_mechanism (channel, "X-TELEPATHY-PASSWORD")) { event_manager_add (approval->manager, account, NULL, EMPATHY_EVENT_TYPE_AUTH, -- 2.39.2