mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-05-02 14:16:59 +02:00
hyperlink mxids and room aliases: open room when clicking on a room id or room alias #442
Do nothing with click on event id because we cannot know the id of the room it belongs to.
This commit is contained in:
@@ -1774,6 +1774,17 @@
|
||||
[self performSegueWithIdentifier:@"showContactDetails" sender:self];
|
||||
}
|
||||
}
|
||||
// Open the clicked room
|
||||
else if ([MXTools isMatrixRoomIdentifier:url.absoluteString] || [MXTools isMatrixRoomAlias:url.absoluteString])
|
||||
{
|
||||
shouldDoAction = NO;
|
||||
|
||||
NSString *roomIdOrAlias = url.absoluteString;
|
||||
|
||||
// Open the room or preview it
|
||||
NSString *fragment = [NSString stringWithFormat:@"/room/%@", [roomIdOrAlias stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]];
|
||||
[[AppDelegate theDelegate] handleUniversalLinkFragment:fragment];
|
||||
}
|
||||
}
|
||||
|
||||
return shouldDoAction;
|
||||
|
||||
Reference in New Issue
Block a user