We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e243b62 commit ecade0aCopy full SHA for ecade0a
crates/matrix-synapse/src/lib.rs
@@ -209,6 +209,12 @@ impl HomeserverConnection for SynapseConnection {
209
err(Debug),
210
)]
211
async fn is_localpart_available(&self, localpart: &str) -> Result<bool, anyhow::Error> {
212
+ // Synapse will give us a M_UNKNOWN error if the localpart is not ASCII,
213
+ // so we bail out early
214
+ if !localpart.is_ascii() {
215
+ return Ok(false);
216
+ }
217
+
218
let localpart = urlencoding::encode(localpart);
219
220
let response = self
0 commit comments