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
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
Alexander Krotov
9e309132f8
Only add gossip headers if chat has more than one peer
2019-12-13 12:51:44 +01:00
Alexander Krotov
88923173c2
Set is_gossiped to true when Autocrypt-Gossip header is added
2019-12-13 12:51:44 +01:00
B. Petersen
3bb58be2b5
add missing delete header
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
ff29b84146
share group image on group creation, fixes #602
2019-12-13 01:17:48 +01:00
B. Petersen
7f723ef2bf
attach selfavatar
2019-12-13 01:17:48 +01:00
holger krekel
1819712667
make sure we send out <> around message-id's in references and in-reply-to
2019-12-10 21:25:36 +01:00
holger krekel
69a596fdff
fix #994 -- avoid double-attachment messages in local chats
2019-12-10 21:25:36 +01:00
holger krekel
d0a04be825
remove hack for decoding, and add a test that encoding/decoding works now
2019-12-10 01:35:09 +01:00