Debug multi device revocation
This commit is contained in:
parent
e954933b66
commit
5fde64ef1e
|
@ -1,8 +1,8 @@
|
|||
|
||||
public extension OWSPrimaryStorage {
|
||||
|
||||
private func getDeviceLinkCollection(for primaryDevice: String) -> String {
|
||||
return "LokiDeviceLinkCollection-\(primaryDevice)"
|
||||
private func getDeviceLinkCollection(for masterHexEncodedPublicKey: String) -> String {
|
||||
return "LokiDeviceLinkCollection-\(masterHexEncodedPublicKey)"
|
||||
}
|
||||
|
||||
public func setDeviceLinks(_ deviceLinks: Set<DeviceLink>, in transaction: YapDatabaseReadWriteTransaction) {
|
||||
|
|
|
@ -1196,11 +1196,11 @@ NS_ASSUME_NONNULL_BEGIN
|
|||
return;
|
||||
}
|
||||
[LKStorageAPI getDeviceLinksAssociatedWith:userHexEncodedPublicKey].thenOn(dispatch_get_main_queue(), ^(NSSet<LKDeviceLink *> *deviceLinks) {
|
||||
if (![deviceLinks contains:^BOOL(LKDeviceLink *deviceLink) {
|
||||
if ([deviceLinks contains:^BOOL(LKDeviceLink *deviceLink) {
|
||||
return [deviceLink.master.hexEncodedPublicKey isEqual:senderHexEncodedPublicKey] && [deviceLink.slave.hexEncodedPublicKey isEqual:userHexEncodedPublicKey];
|
||||
}]) {
|
||||
[NSUserDefaults.standardUserDefaults setBool:YES forKey:@"wasUnlinked"];
|
||||
[NSNotificationCenter.defaultCenter postNotification:NSNotification.dataNukeRequested];
|
||||
[NSNotificationCenter.defaultCenter postNotificationName:NSNotification.dataNukeRequested object:nil];
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue