Commit 1ec5606
feat: send pre-message on messages with large attachments (#7410)
part of #7367
progress / what's to do:
- [x] send pre-message
- [x] The message's state must be set to MessageState::OutDelivered only
after both messages are sent. If a read receipt is received, the message
can be OutMdnRcvd or OutPending; let's just do whatever is easiest for
now. Take care not to revert from OutMdnReceived to OutDelivered if we
first receive a read receipt and then deliver the full message.
- this is already the case:
- `OutDelivered` is set when a message is sent out and has no remaining
send jobs in the smtp table for this message id - so already works since
full message and pre message have same msgId in that table.
- `OutMdnRcvd` is a "virtual" state
(#7367 (comment)),
so going back to `OutDelivered` can't happen anymore
- [x] delimit `ChatFullMessageId` with `<` and `>` like the other
message ids
- [x] add tests
- [x] test that pre message is sent for attachment larger than X
- test that correct headers are present on both messages
- also test that Autocrypt-gossip and selfavatar should never go into
full-messages
- [x] test that no pre message is sent for attachment smaller than X
- no "is full message" header should be present
- [x] test that pre message is not send for large webxdc update or large
text
- [x] fix test
`receive_imf::receive_imf_tests::test_dont_reverify_by_self_on_outgoing_msg`
---------
Co-authored-by: iequidoo <[email protected]>
Co-authored-by: Hocuri <[email protected]>1 parent 6d7f453 commit 1ec5606
File tree
5 files changed
+521
-17
lines changed- src
5 files changed
+521
-17
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
31 | 33 | | |
32 | 34 | | |
33 | 35 | | |
34 | 36 | | |
35 | 37 | | |
36 | 38 | | |
37 | 39 | | |
38 | | - | |
| 40 | + | |
39 | 41 | | |
40 | 42 | | |
41 | 43 | | |
| |||
2733 | 2735 | | |
2734 | 2736 | | |
2735 | 2737 | | |
| 2738 | + | |
| 2739 | + | |
| 2740 | + | |
| 2741 | + | |
| 2742 | + | |
| 2743 | + | |
| 2744 | + | |
| 2745 | + | |
| 2746 | + | |
| 2747 | + | |
| 2748 | + | |
| 2749 | + | |
| 2750 | + | |
| 2751 | + | |
| 2752 | + | |
| 2753 | + | |
| 2754 | + | |
| 2755 | + | |
| 2756 | + | |
| 2757 | + | |
| 2758 | + | |
| 2759 | + | |
| 2760 | + | |
| 2761 | + | |
| 2762 | + | |
| 2763 | + | |
| 2764 | + | |
| 2765 | + | |
| 2766 | + | |
| 2767 | + | |
| 2768 | + | |
| 2769 | + | |
| 2770 | + | |
| 2771 | + | |
| 2772 | + | |
| 2773 | + | |
| 2774 | + | |
| 2775 | + | |
| 2776 | + | |
| 2777 | + | |
| 2778 | + | |
| 2779 | + | |
| 2780 | + | |
| 2781 | + | |
| 2782 | + | |
| 2783 | + | |
2736 | 2784 | | |
2737 | 2785 | | |
2738 | 2786 | | |
| |||
2804 | 2852 | | |
2805 | 2853 | | |
2806 | 2854 | | |
2807 | | - | |
2808 | | - | |
2809 | | - | |
2810 | | - | |
2811 | | - | |
2812 | | - | |
2813 | | - | |
| 2855 | + | |
| 2856 | + | |
| 2857 | + | |
| 2858 | + | |
| 2859 | + | |
| 2860 | + | |
| 2861 | + | |
| 2862 | + | |
2814 | 2863 | | |
2815 | 2864 | | |
2816 | 2865 | | |
| |||
2870 | 2919 | | |
2871 | 2920 | | |
2872 | 2921 | | |
| 2922 | + | |
| 2923 | + | |
| 2924 | + | |
| 2925 | + | |
| 2926 | + | |
| 2927 | + | |
| 2928 | + | |
| 2929 | + | |
| 2930 | + | |
| 2931 | + | |
| 2932 | + | |
| 2933 | + | |
| 2934 | + | |
| 2935 | + | |
2873 | 2936 | | |
2874 | | - | |
| 2937 | + | |
2875 | 2938 | | |
2876 | 2939 | | |
2877 | 2940 | | |
2878 | | - | |
| 2941 | + | |
2879 | 2942 | | |
2880 | 2943 | | |
2881 | 2944 | | |
| |||
0 commit comments