mirror of
https://github.com/vector-im/element-ios.git
synced 2024-09-28 23:32:41 +00:00
Permalimks: Use the beta path of the web app instead of /develop
This commit is contained in:
parent
447de39743
commit
7437aa6a9a
5 changed files with 17 additions and 9 deletions
|
@ -28,9 +28,13 @@
|
|||
*/
|
||||
+ (NSString*)presenceText:(MXUser*)user;
|
||||
|
||||
|
||||
#pragma mark - Universal link
|
||||
|
||||
/**
|
||||
The url of the Vector web application.
|
||||
*/
|
||||
+ (NSString*)webAppUrl;
|
||||
|
||||
/**
|
||||
Detect if a URL is a universal link for the application.
|
||||
|
||||
|
|
|
@ -61,6 +61,13 @@
|
|||
|
||||
#pragma mark - Universal link
|
||||
|
||||
+ (NSString *)webAppUrl
|
||||
{
|
||||
// FIXME: When available, use the prod Vector web app URL
|
||||
return [[NSUserDefaults standardUserDefaults] objectForKey:@"webAppUrlBeta"];
|
||||
//return [[NSUserDefaults standardUserDefaults] objectForKey:@"webAppUrlDev"];
|
||||
}
|
||||
|
||||
+ (BOOL)isUniversalLink:(NSURL*)url
|
||||
{
|
||||
BOOL isUniversalLink = NO;
|
||||
|
|
|
@ -16,6 +16,8 @@
|
|||
<string>matrix.org</string>
|
||||
<key>webAppUrlDev</key>
|
||||
<string>https://vector.im/develop</string>
|
||||
<key>webAppUrlBeta</key>
|
||||
<string>https://vector.im/beta</string>
|
||||
<key>apnsDeviceToken</key>
|
||||
<string></string>
|
||||
<key>showAllEventsInRoomHistory</key>
|
||||
|
|
|
@ -1329,11 +1329,8 @@
|
|||
[strongSelf cancelEventSelection];
|
||||
|
||||
// Create a permalink that is common to all Vector.im clients
|
||||
// FIXME: When available, use the prod Vector web app URL
|
||||
NSString *webAppUrl = [[NSUserDefaults standardUserDefaults] objectForKey:@"webAppUrlDev"];
|
||||
|
||||
NSString *permalink = [NSString stringWithFormat:@"%@/#/room/%@/%@",
|
||||
webAppUrl,
|
||||
[Tools webAppUrl],
|
||||
selectedEvent.roomId,
|
||||
selectedEvent.eventId];
|
||||
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
#import "AuthInputsView.h"
|
||||
|
||||
#import "VectorDesignValues.h"
|
||||
#import "Tools.h"
|
||||
|
||||
@interface AuthInputsView ()
|
||||
{
|
||||
|
@ -311,11 +312,8 @@
|
|||
submittedEmail = [[MXK3PID alloc] initWithMedium:kMX3PIDMediumEmail andAddress:self.emailTextField.text];
|
||||
|
||||
// Create the next link that is common to all Vector.im clients
|
||||
// FIXME: When available, use the prod Vector web app URL
|
||||
NSString *webAppUrl = [[NSUserDefaults standardUserDefaults] objectForKey:@"webAppUrlDev"];
|
||||
|
||||
NSString *nextLink = [NSString stringWithFormat:@"%@/#/register?client_secret=%@&hs_url=%@&is_url=%@&session_id=%@",
|
||||
webAppUrl,
|
||||
[Tools webAppUrl],
|
||||
[submittedEmail.clientSecret stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLHostAllowedCharacterSet]],
|
||||
[restClient.homeserver stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLHostAllowedCharacterSet]],
|
||||
[restClient.identityServer stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLHostAllowedCharacterSet]],
|
||||
|
|
Loading…
Reference in a new issue