Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions crates/matrix-synapse/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,12 @@ impl HomeserverConnection for SynapseConnection {
err(Debug),
)]
async fn is_localpart_available(&self, localpart: &str) -> Result<bool, anyhow::Error> {
// Synapse will give us a M_UNKNOWN error if the localpart is not ASCII,
// so we bail out early
if !localpart.is_ascii() {
return Ok(false);
}

let localpart = urlencoding::encode(localpart);

let response = self
Expand Down
Loading