summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2013-09-17 14:43:26 +0200
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2013-09-18 08:08:42 +0200
commitadc09e9b0cadf015c399942a5c646e111a2c7aad (patch)
treee25f7191aa4f84fa294af7ba4e401d49b16a6fd0
parent92067c3f489af9beee16bbcefe721a0fc3c7482c (diff)
downloadtelepathy-haze-adc09e9b0cadf015c399942a5c646e111a2c7aad.tar.gz
connection: claim to support MailNotification if supported
We never advertised that we support this Haze specific extension. https://bugs.freedesktop.org/show_bug.cgi?id=69466
-rw-r--r--src/connection.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/connection.c b/src/connection.c
index 6fd12d3..86828d7 100644
--- a/src/connection.c
+++ b/src/connection.c
@@ -167,6 +167,12 @@ protocol_info_supports_blocking (PurplePluginProtocolInfo *prpl_info)
return (prpl_info->add_deny != NULL);
}
+static gboolean
+protocol_info_supports_mail_notification (PurplePluginProtocolInfo *prpl_info)
+{
+ return ((prpl_info->options & OPT_PROTO_MAIL_CHECK) != 0);
+}
+
static void
connected_cb (PurpleConnection *pc)
{
@@ -190,6 +196,14 @@ connected_cb (PurpleConnection *pc)
tp_base_connection_add_interfaces (base_conn, blocking_ifaces);
}
+ if (protocol_info_supports_mail_notification (prpl_info))
+ {
+ static const gchar *mail_ifaces[] = {
+ HAZE_IFACE_CONNECTION_INTERFACE_MAIL_NOTIFICATION,
+ NULL };
+ tp_base_connection_add_interfaces (base_conn, mail_ifaces);
+ }
+
tp_base_contact_list_set_list_received (
(TpBaseContactList *) conn->contact_list);