@@ -60,10 +60,25 @@ } _client = [client retain]; of_log(@"Logged in client: %@", _client); + [self sync]; + }]; +} + +- (void)sync +{ + [_client syncWithTimeout: 5 + block: ^ (id exception) { + if (exception != nil) { + of_log(@"Failed to sync: %@", exception); + [OFApplication terminateWithStatus: 1]; + } + + of_log(@"Synced"); + [self fetchRoomList]; }]; } - (void)fetchRoomList