3232#import " MXBackgroundModeHandler.h"
3333#import " RLMRealm+MatrixSDK.h"
3434
35- NSUInteger const kMXRealmCryptoStoreVersion = 18 ;
35+ NSUInteger const kMXRealmCryptoStoreVersion = 17 ;
3636
3737static 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