adium 2080:bfa0cf57ce7e: Don't consider group chats when looking...

commits at adium.im commits at adium.im
Mon May 4 21:13:32 UTC 2009


details:	http://hg.adium.im/adium/rev/bfa0cf57ce7e
revision:	2080:bfa0cf57ce7e
author:		Zachary West <zacw at adium.im>
date:		Mon May 04 17:13:25 2009 -0400

Don't consider group chats when looking up an existing chat for a contact.

Fixes returning a group chat for a meta contact, and setting a typing indicator for meta contacts wrongly. Fixes #11847.

diffstat:

 Source/AIChatController.m |  6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diffs (21 lines):

diff -r 45b0ea862e52 -r bfa0cf57ce7e Source/AIChatController.m
--- a/Source/AIChatController.m	Sat May 02 20:20:03 2009 -0700
+++ b/Source/AIChatController.m	Mon May 04 17:13:25 2009 -0400
@@ -355,13 +355,15 @@
 	if ([inContact isKindOfClass:[AIMetaContact class]]) {
 		//Search for a chat with any contact within this AIMetaContact
 		for (chat in openChats) {
-			if ([[(AIMetaContact *)inContact containedObjects] containsObjectIdenticalTo:chat.listObject]) break;
+			if (!chat.isGroupChat &&
+				[[(AIMetaContact *)inContact containedObjects] containsObjectIdenticalTo:chat.listObject]) break;
 		}
 
 	} else {
 		//Search for a chat with this AIListContact
 		for (chat in openChats) {
-			if (chat.listObject == inContact) break;
+			if (!chat.isGroupChat &&
+				chat.listObject == inContact) break;
 		}
 	}
 	




More information about the commits mailing list