From adc09e9b0cadf015c399942a5c646e111a2c7aad Mon Sep 17 00:00:00 2001 From: Guillaume Desmottes Date: Tue, 17 Sep 2013 14:43:26 +0200 Subject: 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); -- cgit v1.2.1