mirror of
https://github.com/chatmail/core.git
synced 2026-04-20 06:56:29 +03:00
feat: Case-insensitive search for non-ASCII chat and contact names (#7477)
This makes `Contact::get_all()` and `Chatlist::try_load()` case-insensitive for non-ASCII chat and
contact names as well. The same approach as in f6f4ccc6ea "feat:
Case-insensitive search for non-ASCII messages (#5052)" is used: `chats.name_normalized` and
`contacts.name_normalized` colums are added which store lowercased/normalized names (for a contact,
if the name is unset, it's a normalized authname). If a normalized name is the same as the
chat/contact name, it's not stored to reduce the db size. A db migration is added for 10000 random
chats and the same number of the most recently seen contacts, for users it will probably migrate all
chats/contacts and for bots which may have more data it's not important.
This commit is contained in:
@@ -160,9 +160,7 @@ async fn test_key_contacts_migration_verified() -> Result<()> {
|
||||
"#,
|
||||
)?)).await?;
|
||||
|
||||
STOP_MIGRATIONS_AT
|
||||
.scope(133, t.sql.run_migrations(&t))
|
||||
.await?;
|
||||
t.sql.run_migrations(&t).await?;
|
||||
|
||||
// Hidden address-contact can't be looked up.
|
||||
assert!(
|
||||
|
||||
Reference in New Issue
Block a user