Skip to content

Commit 57e0a09

Browse files
authored
Merge pull request #1450 from matrix-org/andy/undo_realm
Revert Realm schema
2 parents 7864fdf + b34545e commit 57e0a09

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

MatrixSDK/Crypto/Data/Store/MXRealmCryptoStore/MXRealmCryptoStore.m

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
#import "MXBackgroundModeHandler.h"
3333
#import "RLMRealm+MatrixSDK.h"
3434

35-
NSUInteger const kMXRealmCryptoStoreVersion = 18;
35+
NSUInteger const kMXRealmCryptoStoreVersion = 17;
3636

3737
static NSString *const kMXRealmCryptoStoreFolder = @"MXRealmCryptoStore";
3838

@@ -114,7 +114,6 @@ @implementation MXRealmOlmSession
114114
@interface MXRealmOlmInboundGroupSession : RLMObject
115115
@property NSString *sessionId;
116116
@property NSString *senderKey;
117-
@property NSString *roomId;
118117
@property NSData *olmInboundGroupSessionData;
119118

120119
// A primary key is required to update `backedUp`.
@@ -124,8 +123,6 @@ @interface MXRealmOlmInboundGroupSession : RLMObject
124123
// Indicate if the key has been backed up to the homeserver
125124
@property BOOL backedUp;
126125

127-
@property BOOL sharedHistory;
128-
129126
@end
130127

131128
@implementation MXRealmOlmInboundGroupSession
@@ -954,10 +951,8 @@ - (void)storeInboundGroupSessions:(NSArray<MXOlmInboundGroupSession *>*)sessions
954951
realmSession = [[MXRealmOlmInboundGroupSession alloc] initWithValue:@{
955952
@"sessionId": session.session.sessionIdentifier,
956953
@"senderKey": session.senderKey,
957-
@"roomId": session.roomId,
958954
@"sessionIdSenderKey": sessionIdSenderKey,
959955
@"olmInboundGroupSessionData": [NSKeyedArchiver archivedDataWithRootObject:session],
960-
@"sharedHistory": @(session.sharedHistory)
961956
}];
962957

963958
[realm addObject:realmSession];
@@ -2155,8 +2150,6 @@ + (BOOL)finaliseMigrationWith:(RLMMigration *)migration oldSchemaVersion:(uint64
21552150
newObject[@"cryptoVersion"] = @(MXCryptoVersion2);
21562151
}
21572152
}];
2158-
case 17:
2159-
MXLogDebug(@"[MXRealmCryptoStore] Migration from schema #17 -> #18: Automatically adding MXRealmOlmInboundGroupSession.roomId and MXRealmOlmInboundGroupSession.sharedHistory");
21602153
}
21612154
}
21622155

0 commit comments

Comments
 (0)