|
|
@ -3,7 +3,9 @@
|
|
|
|
//
|
|
|
|
//
|
|
|
|
|
|
|
|
|
|
|
|
#import "TSInfoMessage.h"
|
|
|
|
#import "TSInfoMessage.h"
|
|
|
|
|
|
|
|
#import "ContactsManagerProtocol.h"
|
|
|
|
#import "NSDate+OWS.h"
|
|
|
|
#import "NSDate+OWS.h"
|
|
|
|
|
|
|
|
#import "TextSecureKitEnv.h"
|
|
|
|
#import <YapDatabase/YapDatabaseConnection.h>
|
|
|
|
#import <YapDatabase/YapDatabaseConnection.h>
|
|
|
|
|
|
|
|
|
|
|
|
NS_ASSUME_NONNULL_BEGIN
|
|
|
|
NS_ASSUME_NONNULL_BEGIN
|
|
|
@ -118,10 +120,12 @@ NSUInteger TSInfoMessageSchemaVersion = 1;
|
|
|
|
return NSLocalizedString(@"UNSUPPORTED_ATTACHMENT", nil);
|
|
|
|
return NSLocalizedString(@"UNSUPPORTED_ATTACHMENT", nil);
|
|
|
|
case TSInfoMessageUserNotRegistered:
|
|
|
|
case TSInfoMessageUserNotRegistered:
|
|
|
|
if (self.unregisteredRecipientId.length > 0) {
|
|
|
|
if (self.unregisteredRecipientId.length > 0) {
|
|
|
|
|
|
|
|
id<ContactsManagerProtocol> contactsManager = [TextSecureKitEnv sharedEnv].contactsManager;
|
|
|
|
|
|
|
|
NSString *recipientName = [contactsManager displayNameForPhoneIdentifier:self.unregisteredRecipientId];
|
|
|
|
return [NSString stringWithFormat:NSLocalizedString(@"ERROR_UNREGISTERED_USER_FORMAT",
|
|
|
|
return [NSString stringWithFormat:NSLocalizedString(@"ERROR_UNREGISTERED_USER_FORMAT",
|
|
|
|
@"Format string for 'unregistered user' error. Embeds {{the "
|
|
|
|
@"Format string for 'unregistered user' error. Embeds {{the "
|
|
|
|
@"unregistered user's signal id}}."),
|
|
|
|
@"unregistered user's name or signal id}}."),
|
|
|
|
self.unregisteredRecipientId];
|
|
|
|
recipientName];
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
return NSLocalizedString(@"CONTACT_DETAIL_COMM_TYPE_INSECURE", nil);
|
|
|
|
return NSLocalizedString(@"CONTACT_DETAIL_COMM_TYPE_INSECURE", nil);
|
|
|
|
}
|
|
|
|
}
|
|
|
|