Merge pull request 'fix: /register lowercases user ids' (#28) from lowercase into master

next
Timo Kösters 2020-05-27 08:26:32 +02:00
commit 25ebde5af8
1 changed files with 2 additions and 1 deletions

View File

@ -126,7 +126,8 @@ pub fn register_route(
let user_id = match UserId::parse_with_server_name(
body.username
.clone()
.unwrap_or_else(|| utils::random_string(GUEST_NAME_LENGTH)),
.unwrap_or_else(|| utils::random_string(GUEST_NAME_LENGTH))
.to_lowercase(),
db.globals.server_name(),
)
.ok()