mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-05-24 00:16:39 +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:
@@ -37,7 +37,6 @@
|
||||
self.eventFormatter.treatMatrixUserIdAsLink = YES;
|
||||
self.eventFormatter.treatMatrixRoomIdAsLink = YES;
|
||||
self.eventFormatter.treatMatrixRoomAliasAsLink = YES;
|
||||
self.eventFormatter.treatMatrixEventIdAsLink = YES;
|
||||
|
||||
// Handle timestamp and read receips display at Vector app level (see [tableView: cellForRowAtIndexPath:])
|
||||
self.useCustomDateTimeLabel = YES;
|
||||
|
||||
@@ -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