mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-10-29 13:55:42 +00:00
fix(tool): fix name of subscribe folder by setting the context
This commit is contained in:
1 parent
dfbb24b6fd
commit
8c50b84d8d
3 files changed
+9
-3
No files matched your search
@@ -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;
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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];
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user