aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy
diff options
context:
space:
mode:
authorXavier Claessens <xclaesse@src.gnome.org>2008-04-21 04:12:34 +0800
committerXavier Claessens <xclaesse@src.gnome.org>2008-04-21 04:12:34 +0800
commit53d5660631a79613346839bd00814dc6859d647d (patch)
tree815c479f887296df74e106f7c17779c450f0ee8d /libempathy
parent694b108e1ad2661a3af90244495d0eb09dad17fa (diff)
downloadgsoc2013-empathy-53d5660631a79613346839bd00814dc6859d647d.tar
gsoc2013-empathy-53d5660631a79613346839bd00814dc6859d647d.tar.gz
gsoc2013-empathy-53d5660631a79613346839bd00814dc6859d647d.tar.bz2
gsoc2013-empathy-53d5660631a79613346839bd00814dc6859d647d.tar.lz
gsoc2013-empathy-53d5660631a79613346839bd00814dc6859d647d.tar.xz
gsoc2013-empathy-53d5660631a79613346839bd00814dc6859d647d.tar.zst
gsoc2013-empathy-53d5660631a79613346839bd00814dc6859d647d.zip
Never set the remote_contact for named rooms, do not pretend it's a p2p chat when on a muc with only one other contact.
svn path=/trunk/; revision=1015
Diffstat (limited to 'libempathy')
-rw-r--r--libempathy/empathy-tp-chat.c29
1 files changed, 21 insertions, 8 deletions
diff --git a/libempathy/empathy-tp-chat.c b/libempathy/empathy-tp-chat.c
index 34fcf64dc..7e26e34a7 100644
--- a/libempathy/empathy-tp-chat.c
+++ b/libempathy/empathy-tp-chat.c
@@ -123,8 +123,18 @@ tp_chat_member_added_cb (EmpathyTpGroup *group,
EmpathyTpChat *chat)
{
EmpathyTpChatPriv *priv = GET_PRIV (chat);
+ guint handle_type = 0;
priv->members_count++;
+ g_signal_emit_by_name (chat, "members-changed",
+ contact, actor, reason, message,
+ TRUE);
+
+ g_object_get (priv->channel, "handle-type", &handle_type, NULL);
+ if (handle_type == TP_HANDLE_TYPE_ROOM) {
+ return;
+ }
+
if (priv->members_count > 2 && priv->remote_contact) {
/* We now have more than 2 members, this is not a p2p chat
* anymore. Remove the remote-contact as it makes no sense, the
@@ -142,10 +152,6 @@ tp_chat_member_added_cb (EmpathyTpGroup *group,
priv->remote_contact = g_object_ref (contact);
g_object_notify (G_OBJECT (chat), "remote-contact");
}
-
- g_signal_emit_by_name (chat, "members-changed",
- contact, actor, reason, message,
- TRUE);
}
static void
@@ -157,8 +163,18 @@ tp_chat_member_removed_cb (EmpathyTpGroup *group,
EmpathyTpChat *chat)
{
EmpathyTpChatPriv *priv = GET_PRIV (chat);
+ guint handle_type = 0;
priv->members_count--;
+ g_signal_emit_by_name (chat, "members-changed",
+ contact, actor, reason, message,
+ FALSE);
+
+ g_object_get (priv->channel, "handle-type", &handle_type, NULL);
+ if (handle_type == TP_HANDLE_TYPE_ROOM) {
+ return;
+ }
+
if (priv->members_count <= 2 && !priv->remote_contact) {
GList *members, *l;
@@ -174,11 +190,8 @@ tp_chat_member_removed_cb (EmpathyTpGroup *group,
g_list_foreach (members, (GFunc) g_object_unref, NULL);
g_list_free (members);
}
-
- g_signal_emit_by_name (chat, "members-changed",
- contact, actor, reason, message,
- FALSE);
}
+
static void
tp_chat_local_pending_cb (EmpathyTpGroup *group,
EmpathyContact *contact,