Alexander Krotov
40dc180b88
Update mailparse to 0.10.2
...
It does not allow parsing emails without @
2020-01-08 16:52:27 +03:00
Alexander Krotov
4529c326c6
Restore newlines and remove semicolon in test_parse_first_addr
2020-01-07 17:23:59 +01:00
Alexander Krotov
a52131b574
cargo fmt
2020-01-07 17:23:19 +01:00
Alexander Krotov
a48d0492c8
Create only one MarkseenMdnOnImap job even if message has multiple reports
...
All created jobs have the same parameters and move the same message,
so it does not make sense to create more than one.
2020-01-07 17:23:19 +01:00
Alexander Krotov
2bba1be817
Show received MDNs even if user has disabled them
...
Delta Chat does not request MDNs if they are disabled, so this change
does not make much difference, but simplifies the logic.
2020-01-07 17:23:19 +01:00
Floris Bruynooghe
9a3bdfb14b
Rename MimeParser to MimeMessage in mimeparser.rs
...
The struct really represents a parsed MIME message and is not used as
a parser itself. After the from_bytes() call (which should arguably
use the FromStr trait instead) the struct is fully populated.
2020-01-06 09:46:47 +00:00
Alexander Krotov
8702f290af
mimeparser: remove unused parsed_protected_headers field
2020-01-05 22:03:10 +01:00
Alexander Krotov
d0b5b7ba03
Turn handle_reports comment into documentation comment
2020-01-04 22:24:16 +01:00
Alexander Krotov
91100d3fac
Lowercase the addresses before gossip peerstate update
...
Normally it happens in addr_cmp function, but update_gossip_peerstates
forms a HashSet of addresses, so they should be lowercased beforehand.
Also adjust the mail_with_cc.txt to test for non-lowercase addresses.
2020-01-02 18:14:27 +00:00
Alexander Krotov
c4e0647bda
Remove NULs from mimeparser tests
2019-12-30 17:32:39 +01:00
Alexander Krotov
6dcc1e09b9
mimeparser: add message.kml parsing test
2019-12-30 17:29:28 +01:00
Alexander Krotov
c9f6e31ca9
Move dc_simplify.rs to simplify.rs
2019-12-20 12:55:57 +01:00
Alexander Krotov
fe4080d59f
refactor(simplify): move dehtml dependency to mimeparser
...
This change also removes unnecessary String clone for HTML messages.
2019-12-20 12:55:57 +01:00
Alexander Krotov
1ee15942cc
Simplify simplify.rs
...
* Remove Simplify structure.
* Match for lines starting with 5 markers, not consisting of exactly 5 markers.
This is a regression from C to Rust conversion, see
2bb1c280d5/src/dc_simplify.c (L154)
* Add tests.
2019-12-16 02:31:38 +03:00
holger krekel
09c7ab1ee6
avoid addrparse to panic() and refactor according code a little with test.
2019-12-15 21:54:20 +01:00
holger krekel
4bacae3711
fix #1037 and simplify mdn-report related code and state
2019-12-15 22:18:34 +03:00
Alexander Krotov
256bb01606
Make prepend_subject a bool
2019-12-15 19:55:49 +01:00
B. Petersen
888507f7ba
test group- and user-avatars in the same mail
2019-12-13 01:17:48 +01:00
B. Petersen
29866092de
adapt the protected-header test; protected-headers really require encryption now and parts of the tests are know to fail now. however, protected-headers are also tested in python implicitly in several places
2019-12-13 01:17:48 +01:00
holger krekel
5e777b3c51
fix test also for avatar deletion, use that drain filter while we in this code area :)
2019-12-13 01:17:48 +01:00
holger krekel
5690c48863
fix merging of protected headers
2019-12-13 01:17:48 +01:00
B. Petersen
409c96e571
add compatiblity headers
2019-12-13 01:17:48 +01:00
B. Petersen
d681fa6cba
use Chat-User-Avatar and Chat-Group-Avatar
...
we change the name on the wire as the old Chat-Group-Image header
could not be used on random mails, it was the marker for a "Changed" message,
if we would keep this names, things will fail for exising installations
as messages are dropped and a "Group image changed" message is shown instead.
2019-12-13 01:17:48 +01:00
B. Petersen
7c3d8356c4
always handle incoming group-avatars
2019-12-13 01:17:48 +01:00
B. Petersen
ab12a4eb39
move ImageAction parsing to a reusable function
2019-12-13 01:17:48 +01:00
B. Petersen
c3fd0889e2
use tri-state ImageAction instead of Option<Option>
2019-12-13 01:17:48 +01:00
B. Petersen
c62532a665
adapt to new HeaderDef api
2019-12-13 01:17:48 +01:00
B. Petersen
a1f496b019
let mimeparser handle profile-images
2019-12-13 01:17:48 +01:00
holger krekel
c33797ff84
remove reverse "check_self" return
2019-12-09 19:41:58 +01:00
holger krekel
5f916f5a9c
- create and use a ContactIds type as an ordered set instead of "Vec<u32>".
...
- recreate the group list more carefully, fixes #985
- resultify a few functions in the dc_receive pipeline
- don't quote displaynames in email-addresses, use utf8, preliminrarily addresses #976
2019-12-09 16:29:24 +01:00
holger krekel
0e8df7d633
use automatic serialization, thanks @link2xt for the tip
2019-12-09 15:43:06 +03:00
holger krekel
e4155e0e16
remove lookup_field in favor of get(HeaderDef::...) with all headers defined in headerdef.rs
2019-12-09 15:43:06 +03:00
holger krekel
d6d94adab0
remove encrypted attr from mimeparser.
2019-12-08 00:47:46 +01:00
holger krekel
099cc9f727
remove subject attribute
2019-12-08 00:47:46 +01:00
holger krekel
61f8d6f171
remove is_send_by_messenger attr from mimeparser
2019-12-08 00:47:46 +01:00
holger krekel
86ace1a4af
- test and fix receiving text/html attachment in multipart/mixed situations
...
They are now preserved as attachment, instead of diving into parsing-html
and simplifying.
- adapt mime-debugging
2019-12-07 22:56:54 +01:00
holger krekel
1abdf62045
passes test but needs cleanup
2019-12-07 22:56:54 +01:00
holger krekel
9e2a96675d
try fix incoming text/html in multipart/mixed
2019-12-07 22:56:54 +01:00
holger krekel
212848409f
use encoded-words crate, which friedel ported from python
2019-12-05 19:29:12 +01:00
holger krekel
e45ee0eb81
try fix filename encoding bug -- fails in one test
2019-12-05 19:29:12 +01:00
Alexander Krotov
ad87b7c4a5
Fix clippy warnings
2019-12-03 20:20:52 +03:00
holger krekel
74f36b264b
fix get_recipients with test
2019-12-03 17:51:44 +01:00
holger krekel
1c5a3e6698
remove debug logging and fix update_gossip_headers location
2019-12-03 12:25:22 +01:00
dignifiedquire
db88212a64
refactor: unsafe, CStr and libc moved out
2019-12-03 12:25:22 +01:00
dignifiedquire
43074464ac
cleanup mimeparser and use mime
2019-12-03 12:25:22 +01:00
dignifiedquire
e985887739
fix content-type setting and some encryption
2019-12-03 12:25:22 +01:00
dignifiedquire
d5287256e0
fix various parsing and sending issues
2019-12-03 12:25:22 +01:00
dignifiedquire
6bb2adaf45
some fixes for mdn handling
2019-12-03 12:25:22 +01:00
dignifiedquire
734bbff04d
cleanup and finish missing parts
2019-12-03 12:25:22 +01:00
dignifiedquire
9196ed1e9f
remove dead code
2019-12-03 12:22:55 +01:00