mirror of
https://github.com/chatmail/core.git
synced 2026-04-29 11:26:29 +03:00
fix: take Chat-Group-Name into account when matching ad hoc groups
This commit is contained in:
@@ -2502,9 +2502,14 @@ async fn lookup_or_create_adhoc_group(
|
|||||||
.context("Cannot lookup address-contact by the From field")?;
|
.context("Cannot lookup address-contact by the From field")?;
|
||||||
|
|
||||||
let grpname = mime_parser
|
let grpname = mime_parser
|
||||||
.get_subject()
|
.get_header(HeaderDef::ChatGroupName)
|
||||||
.map(|s| remove_subject_prefix(&s))
|
.map(|s| s.to_string())
|
||||||
.unwrap_or_else(|| "👥📧".to_string());
|
.unwrap_or_else(|| {
|
||||||
|
mime_parser
|
||||||
|
.get_subject()
|
||||||
|
.map(|s| remove_subject_prefix(&s))
|
||||||
|
.unwrap_or_else(|| "👥📧".to_string())
|
||||||
|
});
|
||||||
let to_ids: Vec<ContactId> = to_ids.iter().filter_map(|x| *x).collect();
|
let to_ids: Vec<ContactId> = to_ids.iter().filter_map(|x| *x).collect();
|
||||||
let mut contact_ids = Vec::with_capacity(to_ids.len() + 1);
|
let mut contact_ids = Vec::with_capacity(to_ids.len() + 1);
|
||||||
contact_ids.extend(&to_ids);
|
contact_ids.extend(&to_ids);
|
||||||
|
|||||||
Reference in New Issue
Block a user