Alexander Krotov
0fefe11bfd
Do not return "empty rfc724_mid" errors from rfc724_mid_cnt
...
This function should only return temporary errors, e.g. database errors,
as precheck_imf() and dc_receive_imf::add_parts() treat them as such,
retrying the fetch on failure. When permanent errors, like missing
Message-ID, are bubbled up, they cause infinite fetch loop.
2020-05-10 16:43:26 +03:00
B. Petersen
076cdae3fd
do not show errors during sending as a ephemeral popup or so, just set the message-state to failed, the error can be queried by the user at any time via 'Info' or so
2020-05-05 21:44:03 +02:00
Alexander Krotov
3035c8af30
Always describe the context of the displayed error
2020-05-04 16:35:42 +03:00
Alexander Krotov
979d7c5625
Do not ignore database read errors in precheck_imf
...
If precheck_imf fails to check if message with the same rfc724_mid
already exists, the same message may be downloaded twice. Instead,
abort the whole operation and retry later.
2020-04-23 15:36:45 +03: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
Alexander Krotov
1b815a7d96
Display an error if message cannot be trashed
2020-04-01 20:06:27 +03:00
B. Petersen
248e6ea5e7
make clippy happy
2020-04-01 20:06:27 +03:00
B. Petersen
be0afdebfd
target comments of @link2xt, fix ci
2020-04-01 20:06:27 +03:00
B. Petersen
9f19d20344
implement message estimating
2020-04-01 20:06:27 +03:00
B. Petersen
d1a4c82937
prototype ffi for ephemeral messages
2020-04-01 20:06:27 +03:00
Alexander Krotov
ad53678c19
Remove msgs.unlinked column
...
It is not used anymore.
Database version 64 migration introducing this column is also removed.
2020-04-01 20:06:27 +03:00
Alexander Krotov
62097765a6
update_server_uid: set server_uid even for unlinked messages
...
Sometimes message deletion job marks message as unlinked without
actually deleting it. It is possible if the message was already moved
into another folder, possibly by second device, but not detected there
yet. It should be detected later in the other folder, and the
server_uid in the database should be set.
Since introduction of add_imap_deletion_jobs() any expired message
record will be marked as unlinked eventually, because another message
deletion job will be scheduled even if update_server_uid() resurrects
the message once.
2020-04-01 20:06:27 +03:00
Alexander Krotov
efb7280e99
Do not schedule delayed DeleteMsgOnImap jobs
...
All IMAP deletion jobs are scheduled either immediately, or later by
job::add_imap_deletion_jobs().
2020-04-01 20:06:27 +03:00
Alexander Krotov
f2aa17c9d0
Resultify MsgId.delete_from_db()
2020-04-01 20:06:27 +03:00
Alexander Krotov
6d216af507
Delete BCC-self messages after "delete_server_after" time
2020-04-01 20:06:27 +03:00
Alexander Krotov
b2f1d9f376
Do not remove rfc724_mid for unlinked messages
...
Message-ID is used to send read receipts. Instead, add a separate
"unlinked" column.
2020-04-01 20:06:27 +03:00
Alexander Krotov
2cf9c68040
Implement MsgId.unlink() and use it in DeleteMsgOnImap
...
Currently only trashed or hidden messages are deleted by
DeleteMsgOnImap, so it is safe to remove database records.
It is planned to delete messages on IMAP server after
user-configurable time to cleanup the server even for messages
displayed in chats. For such messages, we unlink them from the
Message-ID, but keep the database record to display them.
2020-04-01 20:06:27 +03:00
Alexander Krotov
cc0f977d6f
Document rfc724_mid_cnt
2020-04-01 20:06:27 +03:00
Alexander Krotov
7879952fde
Delete MDNs first in MsgId.delete_from_db()
2020-04-01 20:06:27 +03:00
Alexander Krotov
4452cab987
Turn Message::Delete_from_db into MsgId method
2020-04-01 20:06:27 +03:00
Alexander Krotov
c1c769ceb0
Add MsgId.trash() and use it to delete messages locally
...
In addition to moving the message into trash chat, this function
removes message text to make sure the message does not remain in the
database. Only the information necessary to delete message from the
server and avoid redownloading it should be kept, such as Message-Id
and IMAP UID.
2020-04-01 20:06:27 +03:00
Alexander Krotov
d64e55c66f
delete_msgs: remove explicit .iter()
2020-04-01 20:06:27 +03:00
B. Petersen
0e4031348f
remove unwrap-flag from dc_truncate() - it was never really used on-purpose
2020-03-02 14:10:44 +01:00
B. Petersen
5cc26762c2
unwrap lineends in summaries
2020-03-02 14:10:44 +01:00
Alexander Krotov
508b8ef2e2
Improve documentation, mostly by hiding behind pub(crate)
2020-02-20 23:37:13 +03:00
dignifiedquire
9cc99ffcd6
add more ser and de impls
2020-02-12 19:12:22 +01:00
Alexander Krotov
b83e6f6e7c
Simplify MsgId.is_special()
2020-01-26 16:19:01 +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
a113127df1
Implement Display for MessageState
2020-01-20 00:35:11 +03:00
Alexander Krotov
df7253b13e
Document MessageState and fix some typos
2020-01-15 00:48:10 +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
Alexander Krotov
693ae9e8f2
Guess mimetype of .webm files as video/webm
2020-01-07 09:19:36 +00:00
Alexander Krotov
73c21ae0a9
refactor: enable clippy::unreadable_literal
2019-12-18 23:23:38 +03:00
Alexander Krotov
d950a58613
Improve documentation
2019-12-04 10:15:40 +01:00
Alexander Krotov
ad87b7c4a5
Fix clippy warnings
2019-12-03 20:20:52 +03:00
dignifiedquire
db88212a64
refactor: unsafe, CStr and libc moved out
2019-12-03 12:25:22 +01:00
dignifiedquire
1e7afa9da0
fix chat-verified
2019-12-03 12:25:22 +01:00
dignifiedquire
d5287256e0
fix various parsing and sending issues
2019-12-03 12:25:22 +01:00
dignifiedquire
5adde12dff
implement mdn rendering
2019-12-03 12:25:22 +01:00
dignifiedquire
47197aa495
Implement message generation using lettre_email
2019-12-03 12:22:55 +01:00
dignifiedquire
dbd6303829
remove mmime
2019-12-03 12:22:55 +01:00
B. Petersen
8923c9e5af
calculate image-size in device-messages
...
eg. android relies on that and fallsback to wrong aspect ratios otherwise.
also, this makes job.rs a little more readable
as some things are moved to message.rs :)
2019-12-03 00:58:04 +01:00
Alexander Krotov
ee18d60644
cargo fmt
2019-12-01 21:01:03 +01:00
Alexander Krotov
612600278a
Move SQL errors into their own module
2019-12-01 21:01:03 +01:00
holger krekel
6f6791c1b5
(flub/r10s/hpk42) remove MoveState and related functions because we don't actually need it anymore
2019-11-28 15:57:26 +01:00
björn petersen
a4a1cd42db
Merge pull request #844 from deltachat/move-location-to-trash
...
Delete msg related POI when message is deleted
2019-11-16 17:40:53 +01:00
Alexander Krotov
69e14dcb2d
Replace some magic numbers with constants
2019-11-16 16:08:08 +00:00
Nico de Haen
e2673894b4
Delete message only if its a POI
2019-11-16 16:55:13 +01:00
Nico de Haen
13ff2bd8c4
Fix wrong indents
2019-11-16 11:28:43 +01:00