Do not assign group IDs to ad hoc groups

This commit is contained in:
link2xt
2021-11-07 15:55:47 +00:00
parent e2ba338923
commit ce6ec64069
4 changed files with 64 additions and 66 deletions

View File

@@ -850,9 +850,12 @@ impl<'a> MimeFactory<'a> {
}
if chat.typ == Chattype::Group {
headers
.protected
.push(Header::new("Chat-Group-ID".into(), chat.grpid.clone()));
// Send group ID unless it is an ad hoc group that has no ID.
if !chat.grpid.is_empty() {
headers
.protected
.push(Header::new("Chat-Group-ID".into(), chat.grpid.clone()));
}
let encoded = encode_words(&chat.name);
headers