fix(core): improve debbuging when dealing with groups

This commit is contained in:
Ludovic Marcotte committed 2020-05-26 09:25:25 -04:00
1 parent e37ae5fec5
commit 5b6096e32c
3 files changed
+39 -8

No files matched your search

@@ -430,7 +430,6 @@ static Class iCalEventK = nil;
NSMutableArray *allUsers;
SOGoUserSettings *us;
NSDictionary *dict;
SOGoUser *sogoUser;
BOOL rc;
int i;
@@ -450,7 +449,9 @@ static Class iCalEventK = nil;
source = [[SOGoUserManager sharedUserManager] sourceWithID: [dict objectForKey: @"SOGoSource"]];
if ([source conformsToProtocol:@protocol(SOGoMembershipSource)])
{
NSArray *members = [(id<SOGoMembershipSource>)(source) membersForGroupWithUID: [dict objectForKey: @"c_uid"]];
NSArray *members;
members = [(id<SOGoMembershipSource>)(source) membersForGroupWithUID: [dict objectForKey: @"c_uid"]];
allUsers = [NSMutableArray array];
for (i = 0; i < [members count]; i++)
@@ -461,6 +462,11 @@ static Class iCalEventK = nil;
// not subscribe him to their own resource!
[allUsers removeObject: [[context activeUser] login]];
}
else
{
[self errorWithFormat: @"Inconsistency error - got group identifier (%@) from a source (%@) that does not support groups.", theIdentifier, [dict objectForKey: @"SOGoSource"]];
return NO;
}
}
else
{