aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy
diff options
context:
space:
mode:
Diffstat (limited to 'libempathy')
-rw-r--r--libempathy/empathy-tp-contact-list.c28
1 files changed, 17 insertions, 11 deletions
diff --git a/libempathy/empathy-tp-contact-list.c b/libempathy/empathy-tp-contact-list.c
index 7c94bc756..71d8efa67 100644
--- a/libempathy/empathy-tp-contact-list.c
+++ b/libempathy/empathy-tp-contact-list.c
@@ -973,10 +973,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);
+ }
}
}
@@ -1165,21 +1168,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;