File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -2752,6 +2752,25 @@ mod tests {
2752
2752
let contact = Contact :: get_by_id ( & alice, msg. from_id ) . await ?;
2753
2753
assert ! ( !contact. is_bot( ) ) ;
2754
2754
2755
+ // Alice receives an auto-generated non-chat message.
2756
+ receive_imf (
2757
+ & alice,
2758
+ b"From: Claire <claire@example.com>\n \
2759
+ To: alice@example.org\n \
2760
+ Message-ID: <789@example.com>\n \
2761
+ Auto-Submitted: auto-generated\n \
2762
+ Date: Fri, 29 Jan 2021 21:37:55 +0000\n \
2763
+ \n \
2764
+ hello\n ",
2765
+ false ,
2766
+ )
2767
+ . await ?;
2768
+ let msg = alice. get_last_msg ( ) . await ;
2769
+ assert_eq ! ( msg. get_text( ) , "hello" . to_string( ) ) ;
2770
+ assert ! ( !msg. is_bot( ) ) ;
2771
+ let contact = Contact :: get_by_id ( & alice, msg. from_id ) . await ?;
2772
+ assert ! ( !contact. is_bot( ) ) ;
2773
+
2755
2774
Ok ( ( ) )
2756
2775
}
2757
2776
You can’t perform that action at this time.
0 commit comments