This commit is contained in:
Tangel 2023-11-14 01:57:36 +00:00 committed by GitHub
parent 3d9fc3e8f2
commit 1a622d2df8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -95,7 +95,7 @@ where
// Regex to extract usernames from webfinger query. Supports different alphabets using `\p{L}`.
// TODO: would be nice if we could implement this without regex and remove the dependency
let regex =
Regex::new(&format!(r"^acct:([\p{{L}}0-9_]+)@{}$", data.domain())).map_err(Error::other)?;
Regex::new(&format!(r"^acct:@?([\p{{L}}0-9_]+)@{}$", data.domain())).map_err(Error::other)?;
Ok(regex
.captures(query)
.and_then(|c| c.get(1))