fix: assign messages to a group if there is a Chat-Group-Name

Otherwise messages sent to small groups
with only two members are incorrectly assigned
to 1:1 chat.
This commit is contained in:
link2xt
2025-08-11 17:16:04 +00:00
committed by l
parent c7340e04ec
commit 1c0201ee3d
2 changed files with 34 additions and 0 deletions

View File

@@ -1271,11 +1271,15 @@ async fn decide_chat_assignment(
chat_id,
chat_id_blocked,
}
} else if mime_parser.get_header(HeaderDef::ChatGroupName).is_some() {
ChatAssignment::AdHocGroup
} else if num_recipients <= 1 {
ChatAssignment::OneOneChat
} else {
ChatAssignment::AdHocGroup
}
} else if mime_parser.get_header(HeaderDef::ChatGroupName).is_some() {
ChatAssignment::AdHocGroup
} else if num_recipients <= 1 {
ChatAssignment::OneOneChat
} else {