mirror of
https://github.com/oxen-io/session-ios.git
synced 2023-12-13 21:30:14 +01:00
Fix edge cases around UD v. linked devices.
This commit is contained in:
parent
8fec73dda5
commit
b83299888f
1 changed files with 4 additions and 4 deletions
|
@ -1450,10 +1450,6 @@ NS_ASSUME_NONNULL_BEGIN
|
|||
return;
|
||||
}
|
||||
|
||||
NSMutableSet<NSNumber *> *deviceIdSet = [NSMutableSet new];
|
||||
for (OWSDevice *device in [OWSDevice currentDevicesWithTransaction:transaction]) {
|
||||
[deviceIdSet addObject:@(device.deviceId)];
|
||||
}
|
||||
SignalRecipient *_Nullable recipient =
|
||||
[SignalRecipient registeredRecipientForRecipientId:localNumber transaction:transaction];
|
||||
if (!recipient) {
|
||||
|
@ -1470,6 +1466,10 @@ NS_ASSUME_NONNULL_BEGIN
|
|||
}
|
||||
}
|
||||
|
||||
NSMutableSet<NSNumber *> *deviceIdSet = [NSMutableSet new];
|
||||
for (OWSDevice *device in [OWSDevice currentDevicesWithTransaction:transaction]) {
|
||||
[deviceIdSet addObject:@(device.deviceId)];
|
||||
}
|
||||
BOOL isInDeviceList = [deviceIdSet containsObject:@(envelope.sourceDevice)];
|
||||
if (!isInDeviceList) {
|
||||
OWSLogInfo(@"Message received from unknown linked device; refreshing device list: %lu.",
|
||||
|
|
Loading…
Reference in a new issue