Add support for joining rooms

FossilOrigin-Name: b1d8afb546f8999f2c6aba10ca589d2b31ba5e0df917230e265abb5b11474f65
This commit is contained in:
Jonathan Schleifer 2020-10-03 17:40:47 +00:00
parent 1985cb9b46
commit 54f1802e89
8 changed files with 215 additions and 24 deletions

View file

@ -74,6 +74,21 @@ OF_APPLICATION_DELEGATE(Tests)
of_log(@"Fetched room list: %@", rooms);
[self joinRoom];
}];
}
- (void)joinRoom
{
[_client joinRoom: @"#test:nil.im"
block: ^ (OFString *roomID, id exception) {
if (exception != nil) {
of_log(@"Failed to join room: %@", exception);
[OFApplication terminateWithStatus: 1];
}
of_log(@"Joined room %@", roomID);
[self logOut];
}];
}