Change domain to host_str

This commit is contained in:
Grafcube 2023-05-20 16:25:48 +05:30
parent 9df5bd086f
commit 3464eeb882
No known key found for this signature in database
GPG key ID: E383688F2878A440

View file

@ -156,7 +156,7 @@ impl<T: Clone> FederationConfig<T> {
/// Returns true if the url refers to this instance. Handles hostnames like `localhost:8540` for
/// local debugging.
pub(crate) fn is_local_url(&self, url: &Url) -> bool {
let mut domain = url.domain().expect("id has domain").to_string();
let mut domain = url.host_str().expect("id has domain").to_string();
if let Some(port) = url.port() {
domain = format!("{}:{}", domain, port);
}