mirror of https://github.com/oxen-io/session-ios
You cannot 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
920 B
Matlab
52 lines
920 B
Matlab
5 years ago
|
//
|
||
|
// Copyright (c) 2018 Open Whisper Systems. All rights reserved.
|
||
|
//
|
||
|
|
||
|
#import "SignalAccount.h"
|
||
5 years ago
|
|
||
5 years ago
|
#import "NSString+SSK.h"
|
||
|
#import "OWSPrimaryStorage.h"
|
||
|
#import "SignalRecipient.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
|