Disable legacy closed groups

This commit is contained in:
nielsandriesse 2020-12-08 13:37:24 +11:00
parent f504965dfa
commit 348c7af191
1 changed files with 10 additions and 1 deletions

View File

@ -561,7 +561,9 @@ typedef enum : NSUInteger {
return; return;
} }
if (self.userLeftGroup) { if ([self.thread isKindOfClass:TSGroupThread.class] && !((TSGroupThread *)self.thread).usesSharedSenderKeys) {
self.inputToolbar.hidden = YES;
} else if (self.userLeftGroup) {
self.inputToolbar.hidden = YES; // user has requested they leave the group. further sends disallowed self.inputToolbar.hidden = YES; // user has requested they leave the group. further sends disallowed
[self dismissKeyBoard]; [self dismissKeyBoard];
} else { } else {
@ -1191,6 +1193,13 @@ typedef enum : NSUInteger {
[self updateInputBarLayout]; [self updateInputBarLayout];
[self ensureScrollDownButton]; [self ensureScrollDownButton];
if ([self.thread isKindOfClass:TSGroupThread.class] && !((TSGroupThread *)self.thread).usesSharedSenderKeys) {
UIAlertController *alert = [UIAlertController alertControllerWithTitle:@"Session"
message:@"Legacy closed groups are no longer supported. Please create a new group to continue." preferredStyle:UIAlertControllerStyleAlert];
[alert addAction:[UIAlertAction actionWithTitle:@"OK" style:UIAlertActionStyleDefault handler:nil]];
[self presentViewController:alert animated:YES completion:nil];
}
} }
// `viewWillDisappear` is called whenever the view *starts* to disappear, // `viewWillDisappear` is called whenever the view *starts* to disappear,