Ignore “open with Signal” if there is an ongoing call.

// FREEBIE
This commit is contained in:
Matthew Chen 2017-04-27 09:39:45 -04:00
parent c4e90089d5
commit c08e6e0fc6
1 changed files with 6 additions and 0 deletions

View File

@ -265,6 +265,12 @@ static NSString *const kURLHostVerifyPrefix = @"verify";
DDLogWarn(@"Application opened with an unknown URL action: %@", url.host);
}
} else if ([url.scheme.lowercaseString isEqualToString:@"file"]) {
if ([Environment getCurrent].callService.call != nil) {
DDLogWarn(@"%@ ignoring 'open with Signal' due to ongoing WebRTC call.", self.tag);
return NO;
}
NSString *filename = url.lastPathComponent;
if ([filename stringByDeletingPathExtension].length < 1) {
DDLogError(@"Application opened with URL invalid filename: %@", url);