Alexander Krotov
b83e6f6e7c
Simplify MsgId.is_special()
2020-01-26 16:19:01 +01:00
Alexander Krotov
2687777a82
Remove unused EmailAddress::new()
2020-01-26 16:18:34 +01:00
Alexander Krotov
3a08929b05
Print "email" JSON-value if it has a wrong type
2020-01-26 12:28:42 +00:00
B. Petersen
99e30d561d
fix oauth2 login by fixing a Serde call
...
oauth2 crashes in beta23
because we did not let Serde remove the quotes from a parsed JSON email-address.
for autoconfig, we try to get a well-known URL
containing the domain of the used address - with the quote that is
https://autoconfig.gmail.com "/mail/config-v1.1.xml?...
unfortunately, instead of just returning an error,
(the url does not exist anyway)
reqwest crashes on the attempt to get this URL.
the Serde-thing is not obvious to me:
while serde_json::Value.as_str() removes the quotes,
serde_json::Value.to_string() does not.
2020-01-26 12:28:42 +00:00
Alexander Krotov
033a44580c
Turn get_[fresh_]msg_cnt() into ChatId members
2020-01-25 22:11:13 +00:00
Alexander Krotov
4734bcfbb4
Update Chat.unarchive() comment
2020-01-25 22:11:13 +00:00
Alexander Krotov
099fe6f477
Rename Chat.set_blocking() into set_blocked()
2020-01-25 22:11:13 +00:00
Alexander Krotov
889327b5f6
Rename Chat.archive() into Chat.set_archived()
2020-01-25 22:11:13 +00:00
Alexander Krotov
a2845f44ab
Turn ChatId-related functions into methods
2020-01-25 22:11:13 +00:00
Alexander Krotov
a7477516d1
mimefactory: factor out get_location_kml_part
2020-01-25 17:44:19 +00:00
bjoern
938d5828fc
Merge pull request #1212 from deltachat/handshake-ignore
...
do not delete handshake messages possibly belonging to secure-joins on other devices
2020-01-25 15:41:20 +01:00
Alexander Krotov
bf3eab453c
Avoid panic in sanitise_name()
...
.truncate() is not safe because it panics if string length does not
lie on character boundary. We convert the string to characters and take
first n character instead.
2020-01-25 13:04:56 +01:00
Alexander Krotov
ebab893330
dc_tools: remove unused dc_derive_safe_stem_ext()
...
It had the same .truncate() bug as BlobObject::sanitise_name()
2020-01-25 13:04:56 +01:00
Alexander Krotov
4c67b3a118
Add failing test_sanitise_name() test
2020-01-25 13:04:56 +01:00
B. Petersen
d74b06f8bf
target comment of @flub
2020-01-24 21:22:12 +01:00
B. Petersen
c54e211147
do not delete handshake messages maybe belonging to secure-joins on other devices
2020-01-24 12:50:26 +01:00
B. Petersen
8817cf5116
don't make me think
2020-01-24 12:32:45 +01:00
Floris Bruynooghe
fb568513b2
When handling vc-contact-confirm the message is Done
...
The HandshaeMessage::Propagate return should only occur for
vg-member-added messages since it is for those that we still need to
handle the group add.
2020-01-24 11:26:27 +01:00
Alexander Krotov
64026fde7c
Store main part of the message outside of "parts" vector
2020-01-22 04:28:35 +00:00
Alexander Krotov
adcdae4abe
Factor get_message_kml_part out of render_message
2020-01-22 04:28:35 +00:00
Alexander Krotov
90a4303c8e
Make it possible to compile with stable Rust
2020-01-21 19:50:42 +03:00
holger krekel
d3b1972505
fix master build
2020-01-21 17:27:21 +01:00
holger krekel
e49e2021e5
i don't think this fuzzy test is very useful -- the mime-parser will end very early on random-input and DC's parsing machinery probably almost never runs.
2020-01-21 16:00:59 +01:00
Alexander Krotov
84a5276ab0
Fix build
...
0f52f63863 rebase broke the build
2020-01-21 17:17:51 +03:00
Alexander Krotov
1732c3b350
Reduce the scope of clippy exceptions
...
This prevents creation of new overly complex functions.
2020-01-21 14:49:53 +01:00
Alexander Krotov
0f52f63863
Add "Auto-Submitted: auto-replied" header to MDNs
...
This header is specified in RFC 3834.
2020-01-21 16:29:18 +03:00
B. Petersen
0043e95ba7
fix message deletion on server
...
before a message is actually deleted,
we verify that server_folder+server_uid matches the Message-ID,
so that we do not delete the wrong message by accident.
the reason for that is that, to my knowledge, server_folder+server_uid
are not necessarily stable but Message-ID is.
anyway, this check was broken and set the server_uid to 0 in all cases -
where it should be set to 0 _only_ on mismatches.
2020-01-21 16:27:21 +03:00
Alexander Krotov
a3f2088046
Fix the message printed on job success
...
"Cannot be retried" does not make it clear if the job succeeded or failed.
2020-01-20 10:47:32 +01:00
Floris Bruynooghe
186f5553b8
Introduce a ChatId newtype
...
This doesn't try and change the way ChatId is used. It still allows
creating them with 0 and lets some function use a ChatId(0) as error
return.
2020-01-19 23:42:08 +01:00
Alexander Krotov
d8454d9da5
Deduplicate SendMdn and SendMsgToSmtp code
2020-01-20 00:35:11 +03:00
Alexander Krotov
318194a216
Rename Param::MessageId into Param::MsgId
...
MsgId refers to database ID, same as crate::message::MsgId newtype.
2020-01-20 00:35:11 +03:00
Alexander Krotov
b50d2358d3
Rename X-Additional-Message-IDs into Additional-Message-IDs
...
X- prefixes are deprecated in https://tools.ietf.org/html/rfc6648
2020-01-20 00:35:11 +03:00
Alexander Krotov
763587ffb4
Load only one job at a time
...
As a result of job, other jobs can be added or deleted. To avoid
processing deleted jobs and to process other jobs in the correct order,
we should reload them after performing each job.
However, we don't use "LIMIT 1" in SQL queries, because we want to be
able to skip over invalid jobs, and checking if job is invalid can only
be done in Rust.
2020-01-20 00:35:11 +03:00
Alexander Krotov
11afdb51f3
Log it when MDNs are combined
2020-01-20 00:35:11 +03:00
Alexander Krotov
e4353f4650
Aggregate SendMdn jobs
2020-01-20 00:35:11 +03:00
Alexander Krotov
9d4437a7f5
Make it possible to add X-Additional-Message-IDs to MDNs
2020-01-20 00:35:11 +03:00
Alexander Krotov
493bf5ed08
Parse additional message IDs in MDNs
2020-01-20 00:35:11 +03:00
Alexander Krotov
93800fd834
Construct list of recipients in SendMdn
...
There is always one recipient for MDNs, so it is easier to only handle
this case.
2020-01-20 00:35:11 +03:00
Alexander Krotov
79bc34ed76
Move check for blocked contact from mimefactory to SendMdn job
2020-01-20 00:35:11 +03:00
Alexander Krotov
b40ad7e87e
Store contact ID in SendMdn job foreign_id
...
This change makes it possible to find all pending MDNs for the contact
with an SQL query.
2020-01-20 00:35:11 +03:00
Alexander Krotov
1ab3fba212
Move check for enabled MDNs from message rendering to MDN job
2020-01-20 00:35:11 +03:00
Alexander Krotov
3cd0bbc0f4
Move foreign_id handling out of mimefactory
2020-01-20 00:35:11 +03:00
Alexander Krotov
a806728e43
Make a new job type for MDN sending
...
Now MDN is generated on every try instead of being stored in a blob.
2020-01-20 00:35:11 +03:00
Alexander Krotov
683037ca69
Remove no-op jobs SendMdnOld and SendMsgToSmtpOld
2020-01-20 00:35:11 +03:00
Alexander Krotov
a113127df1
Implement Display for MessageState
2020-01-20 00:35:11 +03:00
Alexander Krotov
fecfaaf812
Test MDN parsing
2020-01-20 00:35:11 +03:00
B. Petersen
f7b23fb0e2
check that recoding of jpg and png files actually works
2020-01-18 00:30:21 +03:00
B. Petersen
42f7abf2f5
for test_selfavatar*(), use the same function signature as for other tests
2020-01-18 00:30:21 +03:00
Floris Bruynooghe
7540770dec
Resultify get_chat_id_by_grpid
...
I want to avoid having to be able to represent a chat_id of 0 in order
to more nicely turn chat_id into a ChatId newtype.
2020-01-16 21:46:06 +01:00
Alexander Krotov
213c5df706
mimefactory: remove unused "increation" field
2020-01-16 23:37:53 +03:00