Permalink
Browse files

Only put roster push/result contacts in the default group if they are…

… not in any other groups
  • Loading branch information...
1 parent 809a901 commit 9a2c58e5aa4e297408294585437f16866337aef7 @benlangfeld committed Jan 16, 2011
Showing with 6 additions and 4 deletions.
  1. +6 −4 TNStropheRoster.j
View
@@ -380,11 +380,12 @@
[_contacts addObject:contact];
- [groupNames addObject:[_defaultGroup name]];
-
for (var i = 0; i < [groupNodes count]; i++)
[groupNames addObject:[[groupNodes objectAtIndex:i] text]];
+ if ([groupNames count] === 0)
+ [groupNames addObject:[_defaultGroup name]];
+
for (var i = 0; i < [groupNames count]; i++)
{
var groupName = [groupNames objectAtIndex:i],
@@ -446,11 +447,12 @@
groupNodes = [aRosterItem childrenWithName:@"group"],
groupNames = [CPArray array];
- [groupNames addObject:[_defaultGroup name]];
-
for (var i = 0; i < [groupNodes count]; i++)
[groupNames addObject:[[groupNodes objectAtIndex:i] text]];
+ if ([groupNames count] === 0)
+ [groupNames addObject:[_defaultGroup name]];
+
[contact setNickname:nickname];
// Remove contact from all groups

0 comments on commit 9a2c58e

Please sign in to comment.