Bot: Disable bot creation for the moment.

This commit is contained in:
SBiOSoftWhare
2020-07-08 17:34:50 +02:00
parent e0299d76c5
commit 22c736bfd1
3 changed files with 24 additions and 15 deletions
+19 -14
View File
@@ -4476,22 +4476,27 @@ NSString *const AppDelegateUniversalLinkDidChangeNotification = @"AppDelegateUni
// Leave the GDPR consent right now
[self dismissGDPRConsent];
BOOL botCreationEnabled = [[NSUserDefaults standardUserDefaults] boolForKey:@"enableBotCreation"];
// And create the room with riot bot in //
self.onBoardingManager = [[OnBoardingManager alloc] initWithSession:session];
MXWeakify(self);
void (^createRiotBotDMcompletion)(void) = ^() {
MXStrongifyAndReturnIfNil(self);
if (botCreationEnabled)
{
// And create the room with riot bot in //
self.onBoardingManager = [[OnBoardingManager alloc] initWithSession:session];
MXWeakify(self);
void (^createRiotBotDMcompletion)(void) = ^() {
MXStrongifyAndReturnIfNil(self);
self.onBoardingManager = nil;
};
[self.onBoardingManager createRiotBotDirectMessageIfNeededWithSuccess:^{
createRiotBotDMcompletion();
} failure:^(NSError * _Nonnull error) {
createRiotBotDMcompletion();
}];
self.onBoardingManager = nil;
};
[self.onBoardingManager createRiotBotDirectMessageIfNeededWithSuccess:^{
createRiotBotDMcompletion();
} failure:^(NSError * _Nonnull error) {
createRiotBotDMcompletion();
}];
}
}
#pragma mark - Identity server service terms