mirror of https://github.com/oxen-io/session-ios
Support for profile fetching so we can display SN changes upon entering
a thread // FREEBIEpull/1/head
parent
b89d16ea90
commit
fe075d2f77
@ -0,0 +1,15 @@
|
|||||||
|
//
|
||||||
|
// Copyright (c) 2017 Open Whisper Systems. All rights reserved.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import "TSRequest.h"
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
|
@interface OWSGetProfileRequest : TSRequest
|
||||||
|
|
||||||
|
- (instancetype)initWithRecipientId:(NSString *)recipientId;
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_END
|
@ -0,0 +1,31 @@
|
|||||||
|
//
|
||||||
|
// Copyright (c) 2017 Open Whisper Systems. All rights reserved.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import "OWSGetProfileRequest.h"
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
|
NSString *const OWSProfileRequestPathFormat = @"v1/profile/%@";
|
||||||
|
|
||||||
|
@implementation OWSGetProfileRequest
|
||||||
|
|
||||||
|
- (instancetype)initWithRecipientId:(NSString *)recipientId
|
||||||
|
{
|
||||||
|
OWSAssert(recipientId.length > 0);
|
||||||
|
|
||||||
|
NSString *path =[NSString stringWithFormat:OWSProfileRequestPathFormat, recipientId];
|
||||||
|
self = [super initWithURL:[NSURL URLWithString:path]];
|
||||||
|
if (!self) {
|
||||||
|
return self;
|
||||||
|
}
|
||||||
|
|
||||||
|
self.HTTPMethod = @"GET";
|
||||||
|
self.parameters = nil;
|
||||||
|
|
||||||
|
return self;
|
||||||
|
}
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_END
|
Loading…
Reference in New Issue