mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-05-21 07:02:09 +02:00
Fix inoperant room links with alias/identifiers
This commit is contained in:
@@ -16,6 +16,7 @@
|
||||
|
||||
#import "UniversalLink.h"
|
||||
#import "NSArray+Element.h"
|
||||
#import "MXTools.h"
|
||||
|
||||
@implementation UniversalLink
|
||||
|
||||
@@ -51,6 +52,13 @@
|
||||
// Remove the first empty path param string
|
||||
pathParams = [pathParams filteredArrayUsingPredicate:[NSPredicate predicateWithFormat:@"length > 0"]];
|
||||
|
||||
// Handle room links with aliases/identifiers
|
||||
if ([MXTools isMatrixRoomAlias:[_url.absoluteString stringByRemovingPercentEncoding]]
|
||||
|| [MXTools isMatrixRoomIdentifier:[_url.absoluteString stringByRemovingPercentEncoding]])
|
||||
{
|
||||
pathParams = @[_url.absoluteString];
|
||||
}
|
||||
|
||||
// URL decode each path param
|
||||
pathParams = [pathParams vc_map:^id _Nonnull(NSString * _Nonnull item) {
|
||||
return [item stringByRemovingPercentEncoding];
|
||||
|
||||
Reference in New Issue
Block a user