diff options
author | Sjoerd Simons <sjoerd.simons@collabora.co.uk> | 2009-08-22 00:37:48 +0800 |
---|---|---|
committer | Sjoerd Simons <sjoerd.simons@collabora.co.uk> | 2009-08-22 00:37:48 +0800 |
commit | 84e30dab1428affe335ef904377d07f8b5fdeb66 (patch) | |
tree | fee9c8ec124a2b5804f6bb4ee31772db56a6e374 /libempathy/empathy-tp-contact-list.c | |
parent | fd8e9c5dc2584055177c7a79021cdd53ca431c22 (diff) | |
parent | 3803736b4326d4bc00d58ccd25f910907f0b4521 (diff) | |
download | gsoc2013-empathy-84e30dab1428affe335ef904377d07f8b5fdeb66.tar gsoc2013-empathy-84e30dab1428affe335ef904377d07f8b5fdeb66.tar.gz gsoc2013-empathy-84e30dab1428affe335ef904377d07f8b5fdeb66.tar.bz2 gsoc2013-empathy-84e30dab1428affe335ef904377d07f8b5fdeb66.tar.lz gsoc2013-empathy-84e30dab1428affe335ef904377d07f8b5fdeb66.tar.xz gsoc2013-empathy-84e30dab1428affe335ef904377d07f8b5fdeb66.tar.zst gsoc2013-empathy-84e30dab1428affe335ef904377d07f8b5fdeb66.zip |
Merge back from master
Diffstat (limited to 'libempathy/empathy-tp-contact-list.c')
-rw-r--r-- | libempathy/empathy-tp-contact-list.c | 28 |
1 files changed, 17 insertions, 11 deletions
diff --git a/libempathy/empathy-tp-contact-list.c b/libempathy/empathy-tp-contact-list.c index 4bbe46b4f..2bf2ec416 100644 --- a/libempathy/empathy-tp-contact-list.c +++ b/libempathy/empathy-tp-contact-list.c @@ -974,10 +974,13 @@ tp_contact_list_add (EmpathyContactList *list, tp_cli_channel_interface_group_call_add_members (priv->subscribe, -1, &handles, message, NULL, NULL, NULL, NULL); } - if (priv->publish && - g_hash_table_lookup (priv->pendings, GUINT_TO_POINTER (handle))) { - tp_cli_channel_interface_group_call_add_members (priv->publish, - -1, &handles, message, NULL, NULL, NULL, NULL); + if (priv->publish) { + TpChannelGroupFlags flags = tp_channel_group_get_flags (priv->subscribe); + if (flags & TP_CHANNEL_GROUP_FLAG_CAN_ADD || + g_hash_table_lookup (priv->pendings, GUINT_TO_POINTER (handle))) { + tp_cli_channel_interface_group_call_add_members (priv->publish, + -1, &handles, message, NULL, NULL, NULL, NULL); + } } } @@ -1166,21 +1169,24 @@ tp_contact_list_get_flags (EmpathyContactList *list) { EmpathyTpContactListPriv *priv; EmpathyContactListFlags flags; - TpChannelGroupFlags group_flags; g_return_val_if_fail (EMPATHY_IS_TP_CONTACT_LIST (list), FALSE); priv = GET_PRIV (list); flags = priv->flags; - group_flags = tp_channel_group_get_flags (priv->subscribe); + if (priv->subscribe != NULL) { + TpChannelGroupFlags group_flags; - if (group_flags & TP_CHANNEL_GROUP_FLAG_CAN_ADD) { - flags |= EMPATHY_CONTACT_LIST_CAN_ADD; - } + group_flags = tp_channel_group_get_flags (priv->subscribe); + + if (group_flags & TP_CHANNEL_GROUP_FLAG_CAN_ADD) { + flags |= EMPATHY_CONTACT_LIST_CAN_ADD; + } - if (group_flags & TP_CHANNEL_GROUP_FLAG_CAN_REMOVE) { - flags |= EMPATHY_CONTACT_LIST_CAN_REMOVE; + if (group_flags & TP_CHANNEL_GROUP_FLAG_CAN_REMOVE) { + flags |= EMPATHY_CONTACT_LIST_CAN_REMOVE; + } } return flags; |