mirror of
https://github.com/LemmyNet/activitypub-federation-rust.git
synced 2024-06-10 17:29:34 +00:00
update
This commit is contained in:
parent
3d9fc3e8f2
commit
1a622d2df8
|
@ -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))
|
||||
|
|
Loading…
Reference in a new issue