mirror of
https://github.com/stoatchat/stoatchat.git
synced 2026-07-14 21:47:02 +00:00
Merge pull request #84 from rmeritz/change-username
This commit is contained in:
@@ -35,7 +35,7 @@ pub async fn req(
|
||||
|
||||
let mut set = doc! {};
|
||||
if let Some(username) = &data.username {
|
||||
if User::is_username_taken(&username).await? {
|
||||
if (username.to_lowercase() != user.username.to_lowercase()) && User::is_username_taken(&username).await? {
|
||||
return Err(Error::UsernameTaken);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user