@@ -228,12 +228,24 @@ block([OFInvalidServerReplyException exception]); return; } @try { - [_storage setNextBatch: nextBatch - forDeviceID: _deviceID]; + [_storage transactionWithBlock: ^ { + [_storage setNextBatch: nextBatch + forDeviceID: _deviceID]; + + [self processRoomsSync: response[@"rooms"]]; + [self processPresenceSync: + response[@"presence"]]; + [self processAccountDataSync: + response[@"account_data"]]; + [self processToDeviceSync: + response[@"to_device"]]; + + return true; + }]; } @catch (id e) { block(e); return; } @@ -406,6 +418,22 @@ block(nil); }]; objc_autoreleasePoolPop(pool); } + +- (void)processRoomsSync: (OFDictionary *)rooms +{ +} + +- (void)processPresenceSync: (OFDictionary *)presence +{ +} + +- (void)processAccountDataSync: (OFDictionary *)accountData +{ +} + +- (void)processToDeviceSync: (OFDictionary *)toDevice +{ +} @end