Remove newlines from group names, chat names and the displayname (#1845)

This commit is contained in:
Hocuri
2020-08-20 09:05:08 +02:00
committed by GitHub
parent 3faf968b7c
commit b9ca7b8ace
4 changed files with 29 additions and 6 deletions

View File

@@ -235,6 +235,7 @@ impl Contact {
name: impl AsRef<str>,
addr: impl AsRef<str>,
) -> Result<u32> {
let name = improve_single_line_input(name);
ensure!(
!addr.as_ref().is_empty(),
"Cannot create contact with empty address"