adium 2412:8f5459ece588: When removing a participant from a grou...
commits at adium.im
commits at adium.im
Sat May 30 19:52:20 UTC 2009
details: http://hg.adium.im/adium/rev/8f5459ece588
revision: 2412:8f5459ece588
author: Zachary West <zacw at adium.im>
date: Sat May 30 15:52:13 2009 -0400
When removing a participant from a group chat, if they aren't in any more group chats, and we have a chat open with them, reset their status to completely unknown.
diffs (27 lines):
diff -r 99e02e41e8b5 -r 8f5459ece588 Plugins/Purple Service/CBPurpleAccount.m
--- a/Plugins/Purple Service/CBPurpleAccount.m Sat May 30 12:24:51 2009 -0400
+++ b/Plugins/Purple Service/CBPurpleAccount.m Sat May 30 15:52:13 2009 -0400
@@ -785,6 +785,23 @@
AIListContact *contact = [self contactWithUID:contactName];
[chat removeObject:contact];
+
+ if (contact.isStranger &&
+ ![adium.chatController allGroupChatsContainingContact:contact.parentContact].count &&
+ [adium.chatController existingChatWithContact:contact.parentContact]) {
+ // The contact is a stranger, not in any more group chats, but we have a message with them open.
+ // Set their status to unknown.
+
+ [contact setStatusWithName:nil
+ statusType:AIUnknownStatus
+ notify:NotifyLater];
+
+ [contact setValue:nil
+ forProperty:@"Online"
+ notify:NotifyLater];
+
+ [contact notifyOfChangedPropertiesSilently:NO];
+ }
}
- (void)removeUsersArray:(NSArray *)usersArray fromChat:(AIChat *)chat
More information about the commits
mailing list