Alexander Krotov
166fe2a4e5
Forbid unsafe code in deltachat crate
2020-01-12 09:02:30 +00:00
Alexander Krotov
b7635a71c8
Do not call unsafe rusqlite::ffi::sqlite3_threadsafe()
...
rusqlite already checks that SQLite is safe to use in multi-threaded mode when it opens the database and returns rusqlite::Error::SqliteSingleThreadedMode otherwise.
2020-01-12 09:02:30 +00:00
Alexander Krotov
6ad4bdea83
Make get_parent_mime_headers() private
2020-01-12 09:12:24 +01:00
Alexander Krotov
efb9a11d22
Do not select drafts as parent message
...
Also create a common parent_query() function to make sure we use the
same message as a parent when determining if it is encrypted and when
actually replying to it.
2020-01-12 09:12:24 +01:00
Alexander Krotov
047d09bcb1
Do not pass &Sql to parent_is_encrypted()
2020-01-12 09:12:24 +01:00
Alexander Krotov
e1ca6b5181
Rename last_msg_in_chat_encrypted into parent_is_encrypted
2020-01-12 09:12:24 +01:00
Alexander Krotov
36a2569537
Make last_msg_in_chat_encrypted a member function
2020-01-12 09:12:24 +01:00
Alexander Krotov
10ceddfa67
Set draft in test_reply_encrypted test
...
Adding unencrypted draft to chat makes the job of determining whether
last message is encrypted harder.
2020-01-12 09:12:24 +01:00
holger krekel
929677afe0
fix typo
2020-01-11 21:10:08 +00:00
Alexander Krotov
ee4adc1363
Return &str from extract_grpid
2020-01-11 14:59:53 +01:00
Alexander Krotov
c7b2bdfaac
mimeparser: simplify get_subject() and get_rfc724_mid
2020-01-11 14:59:53 +01:00
Alexander Krotov
fde8fb960b
oauth2: replace unwrap() and is_none() with "if let"
2020-01-11 14:59:53 +01:00
Alexander Krotov
9a43d26c60
dc_receive_imf: do not unwrap() Some(..) immediately after creation
2020-01-11 14:59:53 +01:00
Alexander Krotov
742f603b3b
Use if let to avoid unwrap() of peerstate
2020-01-11 14:59:53 +01:00
Alexander Krotov
a82f2a5df3
Simplify needs_encoding() and add a test
2020-01-11 14:59:53 +01:00
Alexander Krotov
06bc5513ae
Use Vec::first to avoid explicit is_empty() check
2020-01-11 14:59:53 +01:00
Alexander Krotov
47b937f880
Turn some enum Param comments into doc-comments
2020-01-11 15:27:09 +03:00
Alexander Krotov
775d27b6a9
Update group test
2020-01-10 15:20:23 +03:00
Alexander Krotov
6c838ab57c
Never reset gossip timestamp for all chats at the same time
2020-01-10 15:20:23 +03:00
Alexander Krotov
8eebd2aa67
Do not reset gossip timestamp when group members change
2020-01-10 15:20:23 +03:00
Alexander Krotov
fc78a08657
Fix inverted should_do_gossip condition
2020-01-10 15:20:23 +03:00
Alexander Krotov
7b3cc95ab7
Derive Debug for Loaded and MimeFactory
2020-01-10 06:42:36 +00:00
Alexander Krotov
bd70765b7d
Join recipients_names and recipients_addr into one vector
...
This change ensures on the type level that number of names and addresses
is the same.
2020-01-10 06:42:36 +00:00
Alexander Krotov
5b424aec22
Remove temporary variable "row"
2020-01-10 06:42:36 +00:00
Alexander Krotov
d6cc0694f0
Move Chat from MimeFactory to Loaded::Message
2020-01-10 06:42:36 +00:00
Alexander Krotov
9738515129
Construct immutable MimeFactory in from_msg
2020-01-10 06:42:36 +00:00
Alexander Krotov
b05ee10f41
Return Err from MimeFactory::from_msg on database errors
2020-01-10 06:42:36 +00:00
Alexander Krotov
67d85f0f86
Make all MimeFactory fields private
2020-01-10 06:42:36 +00:00
Alexander Krotov
2ddeef761f
Fix gossiped_timestamp documentation
2020-01-09 15:40:58 +03:00
Alexander Krotov
43e0109d44
Update reqwest to 0.10.0
2020-01-09 12:17:17 +03:00
Alexander Krotov
02bb41697d
Add MessengerMessage type for is_dc_message field
2020-01-08 19:00:45 +03:00
Alexander Krotov
12cd56e3e8
Rename type_0 into viewtype
2020-01-08 19:00:45 +03:00
Floris Bruynooghe
72cfb70e35
Refactor create_chat_from_msg_id
...
The goal here is to not have a `mut chat_id` as I want to change chat
id into an opaque newtype and we can't modify it like that anymore.
2020-01-08 14:58:44 +01:00
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
f6660af014
Update test_mdn_asymmetric
...
MDNs are processed now even when MDNs are disabled
2020-01-07 17:23:19 +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
bjoern
8a394fb08f
Merge pull request #1141 from deltachat/add-missing-event
...
send DC_EVENT_CHAT_MODIFIED when adding members to a group
2020-01-07 13:46:17 +01:00
Alexander Krotov
693ae9e8f2
Guess mimetype of .webm files as video/webm
2020-01-07 09:19:36 +00:00
B. Petersen
4b7b6d6cb3
send DC_EVENT_CHAT_MODIFIED when adding members to a group (removing is already fine)
2020-01-06 23:35:27 +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
7aeddc63ac
Use DC_CHAT_ID_DEADDROP instead of constant "1"
2020-01-06 00:04:03 +00:00
Floris Bruynooghe
2990a1c255
Mark the ChatInfo struct non_exhaustive
...
This is a new feature in Rust 1.40, it means users outside the crate
will not be able to create these structs, allowing us to add fields
without breaking the public API.
2020-01-05 22:53:52 +00:00
B. Petersen
91eea03b18
hide messages with Secure-Join headers if the Secure-Join fails
2020-01-05 22:06:06 +01: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
f3d68c6f25
Add requests dependency to python/README.rst
...
It is used in tests/conftest.py
2020-01-04 20:18:31 +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