X-Git-Url: http://git.maemo.org/git/?p=conv-inbox;a=blobdiff_plain;f=src%2Fel-home-applet.c;h=26c4f143ec3d95ea0eccf95accbe2895b910e02d;hp=ec3762d15e3e75f2f5b94b0f8560e4d08a68b144;hb=6103a7223d0abf9a9798874213e0042c5e544cff;hpb=5975e5aa83b4683748d19a99f1e35a67bb4f86b1 diff --git a/src/el-home-applet.c b/src/el-home-applet.c index ec3762d..26c4f14 100644 --- a/src/el-home-applet.c +++ b/src/el-home-applet.c @@ -25,6 +25,7 @@ #include #include #include +#include #include #include #include @@ -143,6 +144,7 @@ struct _ELHomeAppletPrivate gchar *remote_id; gchar *local_id; gchar *channel; + int flags; OssoABookContact *contact; gboolean time_fmt_24h; @@ -991,6 +993,7 @@ show_event (ELHomeApplet *self, RTComElIter *it) "remote-ebook-uid", &priv->contact_id, "free-text", &priv->message, "channel", &priv->channel, + "flags", &priv->flags, NULL)) { received = format_time (received_t, priv->time_fmt_24h); @@ -1403,7 +1406,8 @@ open_conversation (ELHomeApplet *self) if (!account) return; - if (!g_strcmp0 (account->protocol_name, "skype")) { + if ((priv->flags & RTCOM_EL_FLAG_CHAT_GROUP) && + (priv->flags & RTCOM_EL_FLAG_CHAT_OPAQUE)) { if (!priv->channel) return; @@ -1431,14 +1435,17 @@ open_conversation (ELHomeApplet *self) MC_ACCOUNT_CRD_INIT (&request); MC_ACCOUNT_CRD_SET (&request, channel_type, TP_IFACE_QUARK_CHANNEL_TYPE_TEXT); - if (priv->channel) { + if ((priv->flags & RTCOM_EL_FLAG_CHAT_ROOM) && + priv->channel) { MC_ACCOUNT_CRD_SET (&request, target_handle_type, TP_HANDLE_TYPE_ROOM); MC_ACCOUNT_CRD_SET (&request, target_id, priv->channel); } - else { + else if (priv->remote_id) { MC_ACCOUNT_CRD_SET (&request, target_handle_type, TP_HANDLE_TYPE_CONTACT); MC_ACCOUNT_CRD_SET (&request, target_id, priv->remote_id); } + else + return; mc_account_channelrequest (account, &request,