dignifiedquire
2adeadfd73
fix: avoid blocking on expensive pgp operations
2020-05-25 00:17:01 +02:00
dignifiedquire
8a7923c974
Merge remote-tracking branch 'origin/master' into feat/async-jobs
2020-05-13 18:29:22 +02:00
B. Petersen
459fec56db
protect '--' in message from being treated as a footer-beginning
2020-04-27 16:47:16 +02:00
Alexander Krotov
daf40fde82
mimefactory: use .next() instead of .nth(0)
2020-04-13 23:02:57 +03:00
holger krekel
1855f84fe0
fix bug in that remove-contact failed on new groups where we didn't have the peerstate of the removed-contact yet
2020-04-13 17:39:31 +02:00
Friedel Ziegelmayer
24f4cbbb27
refactor: replace failure
...
- failure is deprecated
- thiserror for deriving Error impl
- anyhow for highlevel error handling
2020-04-10 22:39:28 +02:00
dignifiedquire
49b2f80ded
Merge remote-tracking branch 'origin/master' into feat/async-jobs
2020-03-26 16:52:07 +01:00
B. Petersen
17ff1ab372
this corrects the To:-list for group-messages with only SELF as member.
...
before, the list was empty
and trying to send to groups that only contain SELF lead to a crash.
in theory, this happens for both, bcc_self enabled or not, however,
if bcc_self was disabled (default setting),
things worked as the whole mimerendering was skipped on a higher level.
also, the saved-messages-chat was not affected as this was checked explicitly.
this pr changes the mimerendering so that From: is used as To:
if there is no recipient-list and the messasge will be sent to SELF only.
2020-03-23 01:48:27 +01:00
dignifiedquire
1846f20f6e
upgrade repl
2020-03-21 14:24:41 +01:00
dignifiedquire
7140898db9
async file io
2020-03-14 16:26:15 +01:00
dignifiedquire
818e921192
it compiles
2020-03-14 15:17:47 +01:00
dignifiedquire
6ea1d665bb
start making sql async
2020-03-14 15:17:23 +01:00
Alexander Krotov
bcbf192bbc
Remove deprecated Chat-Group-Image header
2020-02-17 13:41:50 +01:00
Alexander Krotov
b80360b7da
Pass avatar file path to build_selfavatar_file as &str
2020-02-15 22:20:05 +03:00
Alexander Krotov
2753883687
Rename add_selfavatar into attach_selfavatar to match field name
2020-02-15 21:22:25 +03:00
Alexander Krotov
aadeb3b87e
job: do not render messages without recipients
2020-02-08 16:58:55 +01:00
B. Petersen
a80632ab36
use RECOMMENDED_FILE_SIZE also for sys.msgsize_max_recommended
2020-01-28 23:32:38 +03:00
Alexander Krotov
893eb8b73b
Move message size limits to constants
...
Corresponding C code:
d31c82478c/src/dc_context.h (L165)
2020-01-28 23:32:38 +03:00
Alexander Krotov
a7477516d1
mimefactory: factor out get_location_kml_part
2020-01-25 17:44:19 +00: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
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
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
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
9d4437a7f5
Make it possible to add X-Additional-Message-IDs to MDNs
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
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
213c5df706
mimefactory: remove unused "increation" field
2020-01-16 23:37:53 +03:00
B. Petersen
73c69c3f93
fix optimisation
2020-01-13 01:43:27 +01:00
bjoern
614ec30e05
Update src/mimefactory.rs
...
Co-Authored-By: Alexander Krotov <ilabdsf@gmail.com >
2020-01-13 01:43:27 +01:00
B. Petersen
d7c07e0ed3
set subject to group-name, tweak prefixes
...
this commit sets the subject of groups to the name of the group.
if the message is a reply in the group, also the prefix `Re:` is added.
the Chat: prefix is removed for groups,
also the Fwd: prefix, as it this would be expected to be set to the
group name of the forwarded message, which is not really compatible with the
rule "group-name = subject" (forwarded messages are detected by the body,
not by the subject)
2020-01-13 01:43:27 +01:00
holger krekel
929677afe0
fix typo
2020-01-11 21:10:08 +00:00
Alexander Krotov
a82f2a5df3
Simplify needs_encoding() and add a test
2020-01-11 14:59:53 +01: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
12cd56e3e8
Rename type_0 into viewtype
2020-01-08 19:00:45 +03:00
Alexander Krotov
cb6376094c
Get rid of DC_FP_* constants
2020-01-01 20:53:31 +00:00
Alexander Krotov
ea03e4d34a
Send location.kml instead of message.kml for streaming
...
message.kml is sent when user manually selects a point on the map to
point to a location.
2019-12-30 17:20:46 +01:00
Alexander Krotov
980bb35441
refactor(mimefactory): use iter::repeat_with instead of (0..)
2019-12-20 12:55:25 +01:00
Alexander Krotov
f2f8898004
fix(mimefactory): wrap base64-encoded attachments to 78 columns
...
RFC5322 requires emails to be wrapped to 78 columns excluding CRLF.
2019-12-20 09:11:35 +01:00
Alexander Krotov
66adfa074b
Do not cache gossiped_timestamp
2019-12-13 12:51:44 +01:00