@@ -1795,13 +1795,7 @@ impl Chat {
1795
1795
let mut location_id = 0 ;
1796
1796
1797
1797
let from = context. get_primary_self_addr ( ) . await ?;
1798
- let new_rfc724_mid = {
1799
- let grpid = match self . typ {
1800
- Chattype :: Group => Some ( self . grpid . as_str ( ) ) ,
1801
- _ => None ,
1802
- } ;
1803
- create_outgoing_rfc724_mid ( grpid, & from)
1804
- } ;
1798
+ let new_rfc724_mid = create_outgoing_rfc724_mid ( & from) ;
1805
1799
1806
1800
if self . typ == Chattype :: Single {
1807
1801
if let Some ( id) = context
@@ -4151,7 +4145,7 @@ pub async fn add_device_msg_with_importance(
4151
4145
if let Some ( msg) = msg {
4152
4146
chat_id = ChatId :: get_for_contact ( context, ContactId :: DEVICE ) . await ?;
4153
4147
4154
- let rfc724_mid = create_outgoing_rfc724_mid ( None , "@device" ) ;
4148
+ let rfc724_mid = create_outgoing_rfc724_mid ( "@device" ) ;
4155
4149
prepare_msg_blob ( context, msg) . await ?;
4156
4150
4157
4151
let timestamp_sent = create_smeared_timestamp ( context) ;
@@ -4291,7 +4285,7 @@ pub(crate) async fn add_info_msg_with_cmd(
4291
4285
parent : Option < & Message > ,
4292
4286
from_id : Option < ContactId > ,
4293
4287
) -> Result < MsgId > {
4294
- let rfc724_mid = create_outgoing_rfc724_mid ( None , "@device" ) ;
4288
+ let rfc724_mid = create_outgoing_rfc724_mid ( "@device" ) ;
4295
4289
let ephemeral_timer = chat_id. get_ephemeral_timer ( context) . await ?;
4296
4290
4297
4291
let mut param = Params :: new ( ) ;
@@ -5932,11 +5926,11 @@ mod tests {
5932
5926
// Alice has an SMTP-server replacing the `Message-ID:`-header (as done eg. by outlook.com).
5933
5927
let sent_msg = alice. pop_sent_msg ( ) . await ;
5934
5928
let msg = sent_msg. payload ( ) ;
5935
- assert_eq ! ( msg. match_indices( "Message-ID: <Gr ." ) . count( ) , 2 ) ;
5936
- assert_eq ! ( msg. match_indices( "References: <Gr ." ) . count( ) , 1 ) ;
5937
- let msg = msg. replace ( "Message-ID: <Gr ." , "Message-ID: <XXX" ) ;
5938
- assert_eq ! ( msg. match_indices( "Message-ID: <Gr ." ) . count( ) , 0 ) ;
5939
- assert_eq ! ( msg. match_indices( "References: <Gr ." ) . count( ) , 1 ) ;
5929
+ assert_eq ! ( msg. match_indices( "Message-ID: <Mr ." ) . count( ) , 2 ) ;
5930
+ assert_eq ! ( msg. match_indices( "References: <Mr ." ) . count( ) , 1 ) ;
5931
+ let msg = msg. replace ( "Message-ID: <Mr ." , "Message-ID: <XXX" ) ;
5932
+ assert_eq ! ( msg. match_indices( "Message-ID: <Mr ." ) . count( ) , 0 ) ;
5933
+ assert_eq ! ( msg. match_indices( "References: <Mr ." ) . count( ) , 1 ) ;
5940
5934
5941
5935
// Bob receives this message, he may detect group by `References:`- or `Chat-Group:`-header
5942
5936
receive_imf ( & bob, msg. as_bytes ( ) , false ) . await . unwrap ( ) ;
@@ -5953,7 +5947,7 @@ mod tests {
5953
5947
send_text_msg ( & bob, bob_chat. id , "ho!" . to_string ( ) ) . await ?;
5954
5948
let sent_msg = bob. pop_sent_msg ( ) . await ;
5955
5949
let msg = sent_msg. payload ( ) ;
5956
- let msg = msg. replace ( "Message-ID: <Gr ." , "Message-ID: <XXX" ) ;
5950
+ let msg = msg. replace ( "Message-ID: <Mr ." , "Message-ID: <XXX" ) ;
5957
5951
let msg = msg. replace ( "Chat-" , "XXXX-" ) ;
5958
5952
assert_eq ! ( msg. match_indices( "Chat-" ) . count( ) , 0 ) ;
5959
5953
0 commit comments