From e8da67612b62f35a157e43193d020b3c896d4c16 Mon Sep 17 00:00:00 2001 From: Guillaume Desmottes Date: Tue, 17 Sep 2013 14:43:26 +0200 Subject: [PATCH 2/5] 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 --- src/connection.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) 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); -- 1.8.3.1