fix(tool): fix name of subscribe folder by setting the context

This commit is contained in:
Hivert Quentin committed 2026-10-27 15:50:08 +01:00
1 parent dfbb24b6fd
commit 8c50b84d8d
3 files changed
+9 -3

No files matched your search

+1
View File
@@ -103,6 +103,7 @@
- (void) removeFolderSettings: (NSMutableDictionary *) moduleSettings
withReference: (NSString *) reference;
- (void) setContext: (WOContext*) ctx;
- (BOOL) subscribeUserOrGroup: (NSString *) theIdentifier
reallyDo: (BOOL) reallyDo
response: (WOResponse *) theResponse;
+6 -2
View File
@@ -375,9 +375,8 @@ static NSArray *childRecordFields = nil;
// Use a format only if it was defined by the user
if (displayNameFormat)
name = [folderSubscriptionValues keysWithFormat: displayNameFormat];
name = [folderSubscriptionValues keysWithFormat: displayNameFormat];
}
return name;
}
@@ -932,6 +931,11 @@ static NSArray *childRecordFields = nil;
return [folderSubscription containsObject: [self folderReference]];
}
- (void) setContext: (WOContext*) ctx
{
context = ctx;
}
- (BOOL) subscribeUserOrGroup: (NSString *) theIdentifier
reallyDo: (BOOL) reallyDo
response: (WOResponse *) theResponse
+2 -1
View File
@@ -391,7 +391,7 @@ typedef enum
NSArray *components;
localContext = [WOContext context];
[localContext setActiveUser: [SOGoUser userWithLogin: owner]];
[localContext setActiveUser: [SOGoUser userWithLogin: user]];
userFolder = [SOGoUserFolder objectWithName: owner inContainer: nil];
components = [folder componentsSeparatedByString: @"/"];
parentFolder = [userFolder lookupName: [components objectAtIndex: 0]
@@ -401,6 +401,7 @@ typedef enum
gcsFolder = [parentFolder lookupPersonalFolder: [components objectAtIndex: 1]
ignoringRights: YES];
[gcsFolder setContext: localContext];
[gcsFolder subscribeUserOrGroup: user reallyDo: reallyDo response: nil];
}