Skip to content

Commit

Permalink
Always validate non empty displayname (#4471)
Browse files Browse the repository at this point in the history
* Always validate non empty displayname

* Add Changelog entry
  • Loading branch information
nicodh authored Jan 10, 2025
1 parent e35235f commit 8046e9c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
- Update shadowsocks crate to 1.22.0 to avoid panic when parsing some QR codes.
- Prefer to encrypt if E2eeEnabled even if peers have EncryptPreference::NoPreference.
- Allow empty `To` field for self-sent messages.
- displayname may not be empty anymore #4471

## Fixed
- fix chat "scrolls up" right after switching (rev 2) #4431
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,10 @@ function EditProfileDialogInner({
}

const onConfirm = async () => {
// Display name needs to be set when setting up an user account for the
// first time after scanning an QRCode with DCACCOUNT scheme (for example
// via chatmail server invite code)
if (firstSetup && displayname.length === 0) {
// Display name should not be empty and needs to be set when setting up an
// user account for the first time after scanning an QRCode with DCACCOUNT scheme
// (for example via chatmail server invite code)
if (displayname.length === 0) {
await openAlertDialog({ message: tx('please_enter_name') })
return
}
Expand Down

0 comments on commit 8046e9c

Please sign in to comment.