Mercurial > pidgin.yaz
diff libpurple/protocols/jabber/presence.c @ 23262:5793bcea224c
Fix the chat-room rejoining bug where the list appears empty.
Closes #5541.
author | Sadrul Habib Chowdhury <imadil@gmail.com> |
---|---|
date | Sun, 01 Jun 2008 18:08:14 +0000 |
parents | 591ef3693345 |
children | 146d16459cda 26eabe8e739b 3da0957e7821 |
line wrap: on
line diff
--- a/libpurple/protocols/jabber/presence.c Sun Jun 01 04:48:51 2008 +0000 +++ b/libpurple/protocols/jabber/presence.c Sun Jun 01 18:08:14 2008 +0000 @@ -49,7 +49,7 @@ xmlnode *presence = user_data; char *chat_full_jid; - if(!chat->conv) + if(!chat->conv || chat->left) return; chat_full_jid = g_strdup_printf("%s@%s/%s", chat->room, chat->server, @@ -581,13 +581,13 @@ if(state == JABBER_BUDDY_STATE_ERROR) { char *title, *msg = jabber_parse_error(js, packet, NULL); - if(chat->conv) { + if (!chat->conv) { + title = g_strdup_printf(_("Error joining chat %s"), from); + purple_serv_got_join_chat_failed(js->gc, chat->components); + } else { title = g_strdup_printf(_("Error in chat %s"), from); if (g_hash_table_size(chat->members) == 0) serv_got_chat_left(js->gc, chat->id); - } else { - title = g_strdup_printf(_("Error joining chat %s"), from); - purple_serv_got_join_chat_failed(js->gc, chat->components); } purple_notify_error(js->gc, title, title, msg); g_free(title); @@ -609,8 +609,9 @@ /* If we haven't joined the chat yet, we don't care that someone * left, or it was us leaving after we closed the chat */ - if(!chat->conv) { - if(jid->resource && chat->handle && !strcmp(jid->resource, chat->handle)) + if (!chat->conv || chat->left) { + if (chat->left && + jid->resource && chat->handle && !strcmp(jid->resource, chat->handle)) jabber_chat_destroy(chat); jabber_id_free(jid); g_free(status);