aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy/empathy-utils.c
diff options
context:
space:
mode:
Diffstat (limited to 'libempathy/empathy-utils.c')
-rw-r--r--libempathy/empathy-utils.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/libempathy/empathy-utils.c b/libempathy/empathy-utils.c
index c4c2780ac..83fe4ce7e 100644
--- a/libempathy/empathy-utils.c
+++ b/libempathy/empathy-utils.c
@@ -1148,3 +1148,18 @@ while_finish:
if (can_video_call != NULL)
*can_video_call = can_video;
}
+
+gboolean
+empathy_sasl_channel_supports_mechanism (TpChannel *channel,
+ const gchar *mechanism)
+{
+ 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);
+
+ return tp_strv_contains (available_mechanisms, mechanism);
+}