mirror of https://github.com/oxen-io/session-ios
mirror of https://github.com/oxen-io/session-ios
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
52 lines
970 B
52 lines
970 B
// |
|
// Copyright (c) 2018 Open Whisper Systems. All rights reserved. |
|
// |
|
|
|
#import "SignalAccount.h" |
|
|
|
#import "NSString+SSK.h" |
|
#import "OWSPrimaryStorage.h" |
|
#import "SignalRecipient.h" |
|
#import <SessionProtocolKit/SessionProtocolKit.h> |
|
|
|
NS_ASSUME_NONNULL_BEGIN |
|
|
|
@interface SignalAccount () |
|
|
|
@property (nonatomic) NSString *recipientId; |
|
|
|
@end |
|
|
|
#pragma mark - |
|
|
|
@implementation SignalAccount |
|
|
|
- (instancetype)initWithSignalRecipient:(SignalRecipient *)signalRecipient |
|
{ |
|
OWSAssertDebug(signalRecipient); |
|
return [self initWithRecipientId:signalRecipient.recipientId]; |
|
} |
|
|
|
- (instancetype)initWithRecipientId:(NSString *)recipientId |
|
{ |
|
if (self = [super init]) { |
|
OWSAssertDebug(recipientId.length > 0); |
|
|
|
_recipientId = recipientId; |
|
} |
|
return self; |
|
} |
|
|
|
- (nullable NSString *)uniqueId |
|
{ |
|
return _recipientId; |
|
} |
|
|
|
- (NSString *)multipleAccountLabelText |
|
{ |
|
return _multipleAccountLabelText.filterStringForDisplay; |
|
} |
|
|
|
@end |
|
|
|
NS_ASSUME_NONNULL_END
|
|
|