[empathy] event-manager: use empathy_sasl_channel_supports_mechanism()
- From: Guillaume Desmottes <gdesmott src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [empathy] event-manager: use empathy_sasl_channel_supports_mechanism()
- Date: Tue, 11 Sep 2012 13:19:25 +0000 (UTC)
commit 8be106a4c0b7ae2ddfe91b796669488db8e38c1f
Author: Guillaume Desmottes <guillaume desmottes collabora co uk>
Date: Tue Sep 11 14:03:58 2012 +0200
event-manager: use empathy_sasl_channel_supports_mechanism()
There is no point re-implementing it.
src/empathy-event-manager.c | 11 ++---------
1 files changed, 2 insertions(+), 9 deletions(-)
---
diff --git a/src/empathy-event-manager.c b/src/empathy-event-manager.c
index c4d2e09..7e34f4c 100644
--- a/src/empathy-event-manager.c
+++ b/src/empathy-event-manager.c
@@ -34,6 +34,7 @@
#include <libempathy/empathy-tp-chat.h>
#include <libempathy/empathy-utils.h>
#include <libempathy/empathy-gsettings.h>
+#include <libempathy/empathy-sasl-mechanisms.h>
#include <extensions/extensions.h>
@@ -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,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]