Open TiMESPLiNTER opened 2 years ago
I digged a bit into the code and it seems that the methods NavigationViewModel.accountSettingsURL
and NavigationViewModel.editProfileURL
should use the URL from the secrets, which is the correct one (it's also the URI the MastodonAPIClient class uses):
let secrets = Secrets(identityId: identityContext.identity.id, keychain: environment.keychain)
defer { secrets.deleteAllItems() }
do {
let instanceURI = try secrets.getInstanceURL();
if instanceURI.hasPrefix("https://") {
return URL(string: "\(instanceURI)/auth/edit")
} else {
return URL(string: "https://\(instanceURI)/auth/edit")
}
} catch {}
Describe the bug It’s not possible to edit profile and account settings in the app if the instance has set a different WEB_DOMAIN than the LOCAL_DOMAIN. For example:
WEB_DOMAIN=mastodon.example.com LOCAL_DOMAIN=example.com.
More details about how Mastodon works in this case: https://github.com/felx/mastodon-documentation/blob/master/Running-Mastodon/Serving_a_different_domain.md
To Reproduce Steps to reproduce the behavior:
Expected behavior The correct pages should open up to edit the settings