Skip to content

Commit 51503c0

Browse files
committed
Style of braces
1 parent 07526b3 commit 51503c0

File tree

2 files changed

+13
-6
lines changed

2 files changed

+13
-6
lines changed

MatrixSDK/Crypto/Algorithms/Megolm/MXMegolmDecryption.m

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -369,17 +369,22 @@ - (MXHTTPOperation *)shareKeysWitUserId:(NSString *)userId
369369
chainIndex:nil];
370370

371371
MXUsersDevicesMap<NSDictionary*> *contentMap = [[MXUsersDevicesMap alloc] init];
372-
for (MXDeviceInfo *deviceInfo in devices) {
372+
for (MXDeviceInfo *deviceInfo in devices)
373+
{
373374
MXOlmSessionResult *olmSessionResult = [results objectForDevice:deviceInfo.deviceId forUser:userId];
374-
if (olmSessionResult.sessionId) {
375+
if (olmSessionResult.sessionId)
376+
{
375377
NSDictionary *message = [self->crypto encryptMessage:payload forDevices:@[deviceInfo]];
376378
[contentMap setObject:message forUser:userId andDevice:deviceInfo.deviceId];
377-
} else {
379+
}
380+
else
381+
{
378382
MXLogDebug(@"[MXMegolmDecryption] No session with device %@, cannot share keys", deviceInfo.deviceId);
379383
}
380384
}
381385

382-
if (contentMap.count == 0) {
386+
if (contentMap.count == 0)
387+
{
383388
MXLogDebug(@"[MXMegolmDecryption] No devices available for user %@, cannot share keys", userId);
384389
if (success)
385390
{

MatrixSDK/Data/MXRoom.m

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,8 @@ - (id)initWithRoomId:(NSString *)roomId matrixSession:(MXSession *)mxSession2 an
122122
_roomId = roomId;
123123
mxSession = mxSession2;
124124

125-
if (mxSession.crypto) {
125+
if (mxSession.crypto)
126+
{
126127
MXMegolmDecryption *decryption = [[MXMegolmDecryption alloc] initWithCrypto:mxSession.crypto];
127128
sharedHistoryKeyManager = [[MXSharedHistoryKeyManager alloc] initWithCrypto:mxSession.crypto service:decryption];
128129
}
@@ -1942,7 +1943,8 @@ - (MXHTTPOperation*)inviteUser:(NSString*)userId
19421943
success:(void (^)(void))success
19431944
failure:(void (^)(NSError *error))failure
19441945
{
1945-
if (MXSDKOptions.sharedInstance.enableRoomSharedHistoryOnInvite) {
1946+
if (MXSDKOptions.sharedInstance.enableRoomSharedHistoryOnInvite)
1947+
{
19461948
[self shareRoomKeysWith:userId];
19471949
}
19481950
return [mxSession.matrixRestClient inviteUser:userId toRoom:self.roomId success:success failure:failure];

0 commit comments

Comments
 (0)