Mercurial > pidgin
diff libgaim/protocols/qq/group_conv.c @ 14404:8ff8f1c897b5
[gaim-migrate @ 17112]
Fixed chat support.
committer: Tailor Script <tailor@pidgin.im>
author | Mark Huetsch <markhuetsch> |
---|---|
date | Fri, 01 Sep 2006 11:03:18 +0000 |
parents | 60b1bc8dbf37 |
children | 6b8bc59414f0 |
line wrap: on
line diff
--- a/libgaim/protocols/qq/group_conv.c Fri Sep 01 10:05:30 2006 +0000 +++ b/libgaim/protocols/qq/group_conv.c Fri Sep 01 11:03:18 2006 +0000 @@ -37,7 +37,8 @@ g_return_if_fail(gc != NULL && gc->proto_data != NULL && group != NULL); qd = (qq_data *) gc->proto_data; - conv = gaim_find_conversation_with_account(GAIM_CONV_TYPE_CHAT, group->group_name_utf8, gaim_connection_get_account(gc)); + conv = gaim_find_conversation_with_account(GAIM_CONV_TYPE_CHAT, + group->group_name_utf8, gaim_connection_get_account(gc)); if (conv == NULL) /* show only one window per group */ serv_got_joined_chat(gc, qd->channel++, group->group_name_utf8); } @@ -54,17 +55,19 @@ names = NULL; flags = NULL; - conv = gaim_find_conversation_with_account(GAIM_CONV_TYPE_CHAT, group->group_name_utf8, gaim_connection_get_account(gc)); + conv = gaim_find_conversation_with_account(GAIM_CONV_TYPE_CHAT, + group->group_name_utf8, gaim_connection_get_account(gc)); if (conv != NULL && group->members != NULL) { list = group->members; while (list != NULL) { member = (qq_buddy *) list->data; /* always put it even offline */ names = g_list_append(names, - (member->nickname != - NULL) ? - g_strdup(member->nickname) : uid_to_gaim_name(member->uid)); - + /* we need unique identifiers for everyone in the chat or else we'll + * run into problems with functions like get_cb_real_name from qq.c */ + (member->nickname != NULL && *(member->nickname) != '\0') ? + g_strdup_printf("%s (qq-%u)", member->nickname, member->uid) : + g_strdup_printf("(qq-%u)", member->uid)); flag = 0; /* TYPING to put online above OP and FOUNDER */ if (is_online(member->status)) flag |= (GAIM_CBFLAGS_TYPING | GAIM_CBFLAGS_VOICE);