mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-26 03:20:50 +02:00
Room details: Support /join command (join room by using room alias)
This commit is contained in:
@@ -2060,10 +2060,14 @@ NSString *const kCmdResetUserPowerLevel = @"/deop";
|
||||
|
||||
// Check
|
||||
if (roomAlias.length) {
|
||||
// FIXME
|
||||
NSLog(@"Join Alias is not supported yet (%@)", text);
|
||||
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"/join is not supported yet" message:nil delegate:nil cancelButtonTitle:@"OK" otherButtonTitles: nil];
|
||||
[alert show];
|
||||
[[MatrixHandler sharedHandler].mxSession joinRoom:roomAlias success:^(MXRoom *room) {
|
||||
// Show the room
|
||||
[[AppDelegate theDelegate].masterTabBarController showRoom:room.state.roomId];
|
||||
} failure:^(NSError *error) {
|
||||
NSLog(@"Join roomAlias (%@) failed: %@", roomAlias, error);
|
||||
//Alert user
|
||||
[[AppDelegate theDelegate] showErrorAsAlert:error];
|
||||
}];
|
||||
} else {
|
||||
// Display cmd usage in text input as placeholder
|
||||
self.messageTextField.placeholder = @"Usage: /join <room_alias>";
|
||||
|
||||
Reference in New Issue
Block a user