holger krekel
e0d750ac64
little cleanup dc_imex
2019-09-27 18:28:29 +02:00
Alexander Krotov
bb57c6e7b7
Merge pull request #627 from deltachat/dc_receive_imf-slice
...
Pass slice to dc_receive_imf
2019-09-27 16:27:14 +00:00
Alexander Krotov
f346a052c1
Return Result from dc_initiate_key_transfer
2019-09-27 17:57:45 +02:00
Alexander Krotov
3933353b5f
Pass slice to dc_receive_imf
...
instead of pointer and length
2019-09-27 17:53:41 +03:00
Dmitry Bogatov
6c9c21c135
quote_word: avoid dependency on phf crate
2019-09-27 04:11:50 +02:00
Dmitry Bogatov
d02a721eed
Reimplement dc_encode_header_words in safe Rust
...
This change fixes proptest, introduced in [THIS~2] commit.
2019-09-27 04:11:50 +02:00
Dmitry Bogatov
96fbeb583b
Add proptest to check dc_header_{encode,decode}
2019-09-27 04:11:50 +02:00
Dmitry Bogatov
33b98a15d3
Remove unused "print_hex" function
2019-09-27 04:11:50 +02:00
Dmitry Bogatov
e523ebe3c1
Implement safe version of quote_word
2019-09-27 04:11:50 +02:00
Dmitry Bogatov
e17c671b7c
Rename local variables to not misleadingly refer to MMAPString
2019-09-27 04:11:50 +02:00
Dmitry Bogatov
e7565e1a2a
Use rust strings instead of MMapString in src/dc_strencode.rs
...
Since Rust strings operations are assumed to never fail, this commit
removes a lot of checking, whether appending to mmapstring fails. Now it
is Rust runtime burden.
2019-09-27 04:11:50 +02:00
B. Petersen
b73d6377fc
do not truncate messages in contact requests
...
core-c has truncated messages in the contact requests.
this is questionable in general, as
- all messages, including contact requests,
are already truncated, unquoted, simplified etc.
- the ui should be capable of showing the full text anyway
(when the contact request is accepted, the whole messase is shown)
- also, all current ui show the contact requests by name only in the
chatlist; the user often does not even come to the contact request view.
- if the ui wants to show the contact request is a special way,
it is probably better to leave this truncation up to the ui
2019-09-27 02:55:23 +02:00
holger krekel
31f5fffc45
cargo fmt
2019-09-26 20:45:03 +02:00
holger krekel
64c518c2f2
remove ok_to_continue
2019-09-26 20:45:03 +02:00
Alexander Krotov
cb499ae502
Return Result<String> from dc_decrypt_setup_file
2019-09-26 18:05:29 +02:00
holger krekel
02b73207f9
fixup this PR with tests, and returning None from get_filemime
2019-09-26 17:12:06 +02:00
jikstra
53b5cbc12a
get_filemime() should return an empty string if no mimetype is present
...
and not default to `applicatopm/octet-stream`
2019-09-26 17:12:06 +02:00
Friedel Ziegelmayer
f4c6decd2d
refactor(mmime): split up into modules ( #609 )
...
refactor(mmime): split up into modules
2019-09-26 15:28:36 +02:00
Floris Bruynooghe
69f1497986
Make dc_get_info() work on a closed context
...
There is very little API guarantees about this, but clients seem to
expect *something* to work on a closed context. So split this up into
static info an more dynamic context-related info, but let's not
provide any guarantees about what keys are available when.
Fixes #599
2019-09-26 14:22:03 +02:00
dignifiedquire
452bce07e1
refactor(mmime): split up into modules
2019-09-26 12:36:23 +02:00
holger krekel
e1dc4b69f5
address all @dignifiedquire review comments
2019-09-25 23:46:44 +02:00
holger krekel
6cd3580263
rustifying dc_continue_key_transfer and fix master-conflict
2019-09-25 23:46:44 +02:00
holger krekel
d5383aecc9
finish dc_imex refactoring, fix linting, rustify some things
2019-09-25 23:46:44 +02:00
holger krekel
71cbbab2c9
fix #596 and some cleanups
2019-09-25 23:46:44 +02:00
holger krekel
8518d8f456
rustify imex and friends
2019-09-25 23:46:44 +02:00
B. Petersen
ea30bb351e
fix boolean error that makes get_setupcodebegin() failing
2019-09-25 20:37:36 +02:00
Alexander Krotov
b93550f6c8
Use DC_MSG_ID_LAST_SPECIAL in dc_continue_key_transfer
2019-09-25 03:29:37 +02:00
Alexander Krotov
60bd053095
Pass setup_code to dc_continue_key_transfer as &str
2019-09-25 03:29:37 +02:00
Alexander Krotov
8165b76001
Make dc_normalize_setup_code safe
2019-09-25 03:29:37 +02:00
jikstra
efc563f5ff
fix test
2019-09-25 01:06:42 +02:00
jikstra
e52acc994c
Make get_draft() return Ok(None) when called for a special chat id
2019-09-25 01:06:42 +02:00
holger krekel
646833d3ec
remove phf crate macro usage: it introduced 7 deps and is really an optimization if you very large (100K+) tables -- we have 10 entries or so and it's called once per message. Let's not introduce crates just because we can -- it increases compile time and in the phf case also introduced a github dependency (for whatever reason -- don't want to know ;)
2019-09-25 00:19:47 +02:00
holger krekel
21c9ff6c85
cargo fmt
2019-09-23 23:13:41 +02:00
holger krekel
4d6b367654
remove ok_to_continue from job
2019-09-23 23:13:41 +02:00
holger krekel
e2fd22a78e
cargo fmt
2019-09-23 21:23:55 +02:00
holger krekel
0759bdde01
cleanup chat.rs: remove ok_to_continue and return result from add_contact methods
2019-09-23 21:23:55 +02:00
holger krekel
faa03e0e14
no functional code change: rename dc_mimefactory to mimefactory and move some functions to become MimeFactory methods
2019-09-23 20:20:34 +02:00
holger krekel
f70897a6d3
rustify new_data_part() and related sanitizations
2019-09-23 18:43:04 +02:00
holger krekel
ba231d2c5f
address @dignifiedquire comments
2019-09-23 17:10:21 +02:00
holger krekel
095cb759ed
avoid cdata_to_free trick and some more cleanups
2019-09-23 17:10:21 +02:00
holger krekel
5cbcb76039
introduce safety and a particular EncryptHelper
2019-09-23 17:10:21 +02:00
holger krekel
3388b42f20
another rustification of encrypt()
2019-09-23 17:10:21 +02:00
holger krekel
e1d541b02e
create wrapmime module and simplify some mailmime code
2019-09-23 17:10:21 +02:00
B. Petersen
321c5e049b
re-add some comments from core-c
2019-09-22 23:39:16 +02:00
holger krekel
ed7cf218f8
address three comments from @dignifiedquire
2019-09-22 23:39:16 +02:00
holger krekel
74d8368525
rustify references, in_reply_to, mimefactory's recipients_{addr,names}
2019-09-22 23:39:16 +02:00
holger krekel
dcbfa272f9
rustify parts of MimeFactory struct
2019-09-22 23:39:16 +02:00
holger krekel
42dd600e0c
more rustifications
2019-09-22 23:39:16 +02:00
holger krekel
9689df601f
streamline mimetype guessing and build_body_file
2019-09-22 23:39:16 +02:00
holger krekel
f6019583b7
better looping on some clists
2019-09-22 23:39:16 +02:00