Signal-iOS/src/Network/API/Requests/TSUpdateAttributesRequest.m
Matthew Chen 0f45f292a1 Add WebRTC setting.
// FREEBIE
2017-01-12 09:07:35 -05:00

28 lines
726 B
Objective-C

//
// TSUpdateAttributesRequest.m
// Signal
//
// Created by Frederic Jacobs on 22/08/15.
// Copyright (c) 2015 Open Whisper Systems. All rights reserved.
//
#import "TSAttributes.h"
#import "TSConstants.h"
#import "TSUpdateAttributesRequest.h"
@implementation TSUpdateAttributesRequest
- (instancetype)initWithUpdatedAttributes:(BOOL)isWebRTCEnabled {
NSString *endPoint = [textSecureAccountsAPI stringByAppendingString:textSecureAttributesAPI];
self = [super initWithURL:[NSURL URLWithString:endPoint]];
if (self) {
[self setHTTPMethod:@"PUT"];
[self.parameters addEntriesFromDictionary:[TSAttributes attributesFromStorage:isWebRTCEnabled]];
}
return self;
}
@end