diff --git a/Tusker/Screens/Onboarding/InstanceSelectorTableViewController.swift b/Tusker/Screens/Onboarding/InstanceSelectorTableViewController.swift index 9d48ca6f..95635f01 100644 --- a/Tusker/Screens/Onboarding/InstanceSelectorTableViewController.swift +++ b/Tusker/Screens/Onboarding/InstanceSelectorTableViewController.swift @@ -159,7 +159,9 @@ class InstanceSelectorTableViewController: UITableViewController { } switch item { case let .selected(instance): - delegate.didSelectInstance(url: URL(string: instance.uri)!) + // we can't just turn the URI string from the API into a URL instance, because Mastodon only includes the domain in the "URI" + let components = parseURLComponents(input: instance.uri) + delegate.didSelectInstance(url: components.url!) case let .recommended(instance): var components = URLComponents() components.scheme = "https"