diff --git a/Vector/Vector-Defaults.plist b/Vector/Vector-Defaults.plist index 70d1e1c1b..52ae90cbb 100644 --- a/Vector/Vector-Defaults.plist +++ b/Vector/Vector-Defaults.plist @@ -14,6 +14,8 @@ https://matrix.org homeserver matrix.org + webAppUrlDev + https://vector.im/develop apnsDeviceToken showAllEventsInRoomHistory diff --git a/Vector/Views/Authentication/AuthInputsView.m b/Vector/Views/Authentication/AuthInputsView.m index 11ac9344d..12e813a96 100644 --- a/Vector/Views/Authentication/AuthInputsView.m +++ b/Vector/Views/Authentication/AuthInputsView.m @@ -277,8 +277,11 @@ submittedEmail = [[MXK3PID alloc] initWithMedium:kMX3PIDMediumEmail andAddress:self.emailTextField.text]; // Create the next link that is common to all Vector.im clients - // FIXME: /develop/ is not nice here - NSString *nextLink = [NSString stringWithFormat:@"https://vector.im/develop/#/register?client_secret=%@&hs_url=%@&is_url=%@&session_id=%@", + // 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, [submittedEmail.clientSecret stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLHostAllowedCharacterSet]], [restClient.homeserver stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLHostAllowedCharacterSet]], [restClient.identityServer stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLHostAllowedCharacterSet]],