Fix: Compose thread picker doesn't show self

This commit is contained in:
Michael Kirk 2018-11-12 10:42:37 -06:00
parent 7eaaab7be4
commit b25a704039

View file

@ -88,6 +88,15 @@ NS_ASSUME_NONNULL_BEGIN
_devices = [NSOrderedSet new];
}
// Since we use device count to determine whether a user is registered or not,
// ensure the local user always has at least *this* device.
if (![_devices containsObject:@(OWSDevicePrimaryDeviceId)]) {
if ([self.uniqueId isEqualToString:self.tsAccountManager.localNumber]) {
DDLogInfo(@"Adding primary device to self recipient.");
[self addDevices:[NSSet setWithObject:@(OWSDevicePrimaryDeviceId)]];
}
}
return self;
}