about summary refs log tree commit diff stats
path: root/src/muc.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/muc.c')
-rw-r--r--src/muc.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/muc.c b/src/muc.c
index a59ac96b..778b2ce3 100644
--- a/src/muc.c
+++ b/src/muc.c
@@ -217,13 +217,13 @@ muc_add_to_roster(const char * const room, const char * const nick,
             updated = TRUE;
             autocomplete_add(chat_room->nick_ac, strdup(nick));
         } else if ((g_strcmp0(p_contact_presence(old), show) != 0) ||
-                    (g_strcmp0(p_contact_status(old), status) != 0)) {
+                    (g_strcmp0(p_contact_status(old, nick), status) != 0)) {
             updated = TRUE;
         }
         PContact contact = p_contact_new(nick, NULL, NULL, FALSE);
         resource_presence_t resource_presence = resource_presence_from_string(show);
-        Resource *resource = resource_new("default", resource_presence, status, 0, caps_str);
-        p_contact_add_resource(contact, resource);
+        Resource *resource = resource_new(nick, resource_presence, status, 0, caps_str);
+        p_contact_set_presence(contact, resource);
         g_hash_table_replace(chat_room->roster, strdup(nick), contact);
     }