+ remove_notification (self);
+ }
+}
+
+static void
+open_conversation (ELHomeApplet *self)
+{
+ ELHomeAppletPrivate *priv = self->priv;
+ McAccount *account;
+ const gchar *persistent_id = NULL;
+
+ if (!((priv->remote_id || priv->group_uid) && priv->local_id))
+ return;
+
+ account = osso_abook_account_manager_lookup_by_name (NULL,
+ priv->local_id);
+ if (!account)
+ return;
+
+ if (priv->group_uid &&
+ g_str_has_prefix (priv->group_uid, "group:")) {
+ persistent_id = strchr (priv->group_uid, '-');
+ if (persistent_id)
+ persistent_id++;
+ }
+
+ if (persistent_id && persistent_id[0] != '\0') {
+ GHashTable *properties = tp_asv_new
+ (TP_IFACE_CHANNEL ".ChannelType", G_TYPE_STRING,
+ TP_IFACE_CHANNEL_TYPE_TEXT,
+ TP_IFACE_CHANNEL ".TargetHandleType", G_TYPE_UINT,
+ TP_HANDLE_TYPE_NONE,
+ RTCOM_TP_IFACE_CHANNEL_INTERFACE_PERSISTENT ".PersistentID",
+ G_TYPE_STRING, persistent_id,
+ NULL);
+
+ mc_account_channelrequest_ht (account,
+ properties,
+ time (NULL),
+ NULL,
+ MC_ACCOUNT_CR_FLAG_USE_EXISTING,
+ NULL, NULL, NULL, NULL);
+
+ g_hash_table_unref (properties);
+ }
+ else if (priv->remote_id) {
+ McAccountChannelrequestData request;
+
+ MC_ACCOUNT_CRD_INIT (&request);
+ MC_ACCOUNT_CRD_SET (&request, channel_type, TP_IFACE_QUARK_CHANNEL_TYPE_TEXT);
+ MC_ACCOUNT_CRD_SET (&request, target_handle_type, TP_HANDLE_TYPE_CONTACT);
+ MC_ACCOUNT_CRD_SET (&request, target_id, priv->remote_id);
+
+ mc_account_channelrequest (account,
+ &request,
+ time (NULL),
+ NULL,
+ MC_ACCOUNT_CR_FLAG_USE_EXISTING,
+ NULL, NULL, NULL, NULL);