File tree 1 file changed +12
-0
lines changed
1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -510,6 +510,7 @@ impl MimeFactory {
510
510
} ;
511
511
512
512
let mut to = Vec :: new ( ) ;
513
+ let mut past_members = Vec :: new ( ) ; // Contents of `Chat-Group-Past-Members` header.
513
514
if undisclosed_recipients {
514
515
to. push ( Address :: new_group (
515
516
"hidden-recipients" . to_string ( ) ,
@@ -541,6 +542,14 @@ impl MimeFactory {
541
542
}
542
543
}
543
544
545
+ for ( name, addr) in & self . past_members {
546
+ if name. is_empty ( ) {
547
+ past_members. push ( Address :: new_mailbox ( addr. clone ( ) ) ) ;
548
+ } else {
549
+ past_members. push ( new_address_with_name ( name, addr. clone ( ) ) ) ;
550
+ }
551
+ }
552
+
544
553
if to. is_empty ( ) {
545
554
to. push ( from. clone ( ) ) ;
546
555
}
@@ -556,6 +565,9 @@ impl MimeFactory {
556
565
headers. push ( Header :: new_with_value ( "Sender" . into ( ) , vec ! [ sender] ) . unwrap ( ) ) ;
557
566
}
558
567
headers. push ( Header :: new_with_value ( "To" . into ( ) , to. clone ( ) ) . unwrap ( ) ) ;
568
+ if !past_members. is_empty ( ) {
569
+ headers. push ( Header :: new_with_value ( "Chat-Group-Past-Members" . into ( ) , to. clone ( ) ) . unwrap ( ) ) ;
570
+ }
559
571
560
572
let subject_str = self . subject_str ( context) . await ?;
561
573
let encoded_subject = if subject_str
You can’t perform that action at this time.
0 commit comments