mirror of
https://github.com/chatmail/core.git
synced 2026-05-05 14:26:30 +03:00
make chat names always searchable (#3377)
* test contact name changes applied everywhere this test is failing on current master, a changed authname is set to `contact.authname` but not cached at `chat.name`; resulting in `dc_chat_get_name()` returning a name undiscoverable by `dc_get_chatlist(name)`. * fix: update chat.name on contact.authname changes * do read contact.display_name from database only of chat.name is empty * update CHANGELOG
This commit is contained in:
@@ -1041,7 +1041,9 @@ impl Chat {
|
||||
if chat.id.is_archived_link() {
|
||||
chat.name = stock_str::archived_chats(context).await;
|
||||
} else {
|
||||
if chat.typ == Chattype::Single {
|
||||
if chat.typ == Chattype::Single && chat.name.is_empty() {
|
||||
// chat.name is set to contact.display_name on changes,
|
||||
// however, if things went wrong somehow, we do this here explicitly.
|
||||
let mut chat_name = "Err [Name not found]".to_owned();
|
||||
match get_chat_contacts(context, chat.id).await {
|
||||
Ok(contacts) => {
|
||||
|
||||
Reference in New Issue
Block a user