diff --git a/MatrixSDK/JSONModels/AutoDiscovery/MXWellKnownAuthentication.h b/MatrixSDK/JSONModels/AutoDiscovery/MXWellKnownAuthentication.h index 23a7c2522..9c483c65e 100644 --- a/MatrixSDK/JSONModels/AutoDiscovery/MXWellKnownAuthentication.h +++ b/MatrixSDK/JSONModels/AutoDiscovery/MXWellKnownAuthentication.h @@ -33,7 +33,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, readonly) NSString *issuer; @property (nonatomic, readonly, nullable) NSString *account; --(NSURL * _Nullable) getMasLogoutDeviceURLFromDeviceID: (NSString * ) deviceID; +-(NSURL * _Nullable) getLogoutDeviceURLFromID: (NSString * ) deviceID; @end diff --git a/MatrixSDK/JSONModels/AutoDiscovery/MXWellKnownAuthentication.m b/MatrixSDK/JSONModels/AutoDiscovery/MXWellKnownAuthentication.m index 03dc13695..fe2cdbdf6 100644 --- a/MatrixSDK/JSONModels/AutoDiscovery/MXWellKnownAuthentication.m +++ b/MatrixSDK/JSONModels/AutoDiscovery/MXWellKnownAuthentication.m @@ -45,21 +45,18 @@ + (instancetype)modelFromJSON:(NSDictionary *)JSONDictionary return wellKnownAuthentication; } --(NSURL * _Nullable) getMasLogoutDeviceURLFromDeviceID: (NSString * ) deviceID +-(NSURL * _Nullable) getLogoutDeviceURLFromID: (NSString * ) deviceID { - if (_account) - { - NSURLComponents *components = [NSURLComponents componentsWithString:_account]; - components.queryItems = @[ - [NSURLQueryItem queryItemWithName:@"device_id" value:deviceID], - [NSURLQueryItem queryItemWithName:@"action" value:@"session_end"] - ]; - return components.URL; - } - else + if (!_account) { return nil; } + NSURLComponents *components = [NSURLComponents componentsWithString:_account]; + components.queryItems = @[ + [NSURLQueryItem queryItemWithName:@"device_id" value:deviceID], + [NSURLQueryItem queryItemWithName:@"action" value:@"session_end"] + ]; + return components.URL; }