Alexander Krotov
25274f13c3
cargo fmt
...
Also formatted SQL query, because rustfmt can't format statements with
too long strings.
2020-10-10 12:41:43 +03:00
Alexander Krotov
093839c2b0
prepare_msg_raw: replace large if with early exit
2020-10-10 12:41:43 +03:00
B. Petersen
4c8e6ef495
use combined index (state, hidden, chat_id) to speed up marknoticed_chat()
2020-10-10 00:32:45 +02:00
René Rössler
9739c0305b
Accessible msg error and type changes
2020-10-08 11:51:04 +02:00
B. Petersen
11107d5484
add comment about unused 'starred' column
2020-10-06 09:32:50 +02:00
B. Petersen
5405bfbc8d
remove unused types "starred" and "in-creation"
...
both are not used in productive:
- chat-id "in-creation" was dropped completely already in core-c
as it does not allow assigning messages to chats in time.
- message flag "starred" was added at some point and never used.
ux-wise, "disappearing messages" promises to clean up a chat -
this does not fit well with "starring" messages.
"saved messages" chat seems to be superior in that regard.
but anyway, it is not used but comes at maintainance costs,
so it is better to delete its functionality for now.
(the db entries, however, are left for now,
that might be more tricky to remove)
2020-10-06 09:32:50 +02:00
Alexander Krotov
a0c92753a9
prepare_msg: return Err if no address is configured
...
Address is used to generate Message-Id.
Previously error toast was shown, but MsgId was returned from
chat::prepare_msg anyway. Now chat::prepare_msg returns an error.
error!() is removed, because FFI library shows errors via
.unwrap_or_log_default().
2020-10-05 10:37:21 +03:00
Hocuri
44558d0ce8
Revert "Export to the new backup format ( #1952 )" ( #1958 )
...
This reverts commit 1fdb697c09 .
because Desktop never had a release with tar-import
2020-10-02 15:34:22 +02:00
Alexander Krotov
be40417a7f
sql: do not set dbversion after each migration
...
This variable is not used afterwards, and it is already not set in
migrations added after version 54.
2020-10-02 16:20:39 +03:00
Alexander Krotov
b437ab86d1
Fix a typo: "probram"
2020-10-02 03:24:24 +03:00
Hocuri
1fdb697c09
Export to the new backup format ( #1952 )
2020-10-01 19:25:02 +02:00
Friedel Ziegelmayer
7786a4ced4
fix: avoid manual poll impl for accounts events
2020-09-29 14:00:10 +02:00
Alexander Krotov
60a8b47ad0
e2ee: require quorum to enable encryption
...
Previously, standard Autocrypt rule was used to determine whether
encryption is enabled: if at least one recipient does not prefer
encryption, encryption is disabled.
This rule has been problematic in large groups, because the larger
is the group, the higher is the chance that one of the users does not
prefer encryption.
New rule requires a majority of users to prefer encryption. Note that it
does not affect 1:1 chats, because it is required that *strictly* more
than a half users in a chat prefer encryption.
2020-09-27 23:38:06 +03:00
Hocuri
02baf4b1f0
Show some inner errors (do not hide them with .context) ( #1916 )
2020-09-26 22:48:47 +02:00
Alexander Krotov
9121e30600
param: escape newlines in values
...
Newlines are escaped by repeating them.
This encoding is compatible to existing values, because they do not
contain newlines.
2020-09-26 07:01:39 +03:00
bjoern
9a80385278
Merge pull request #1942 from deltachat/add-msgs-seen-event
...
split DC_EVENT_MSGS_NOTICED off DC_EVENT_MSGS_CHANGED, remove dc_marknoticed_all_chats()
2020-09-25 21:41:10 +02:00
B. Petersen
f0fb1bfdcb
make clippy happy
2020-09-24 14:36:04 +02:00
B. Petersen
ab90b6b390
emit multiple events if messages given to dc_markseen_msgs() belong to different chats
2020-09-24 14:05:34 +02:00
B. Petersen
e9733e7525
always set chat_id on DC_EVENT_MSGS_NOTICED
2020-09-24 12:21:18 +02:00
B. Petersen
f3c7d2f9c6
remove unused function dc_marknoticed_all_chats()
2020-09-24 11:36:40 +02:00
B. Petersen
5c1b69c3c5
if possible, set chat_id in DC_EVENT_MSGS_NOTICED even emitted by dc_markseen_msgs()
2020-09-24 11:36:40 +02:00
B. Petersen
12bc364e42
split DC_EVENT_MSGS_NOTICED off DC_EVENT_MSGS_CHANGED
...
the new event can be used for updating the badge counter.
to get the old behaviour, implementations can just do the same on both events.
2020-09-24 11:36:39 +02:00
Hocuri
879bd7e35e
Improve sentbox name guessing
2020-09-24 10:25:32 +02:00
B. Petersen
2095962466
update provider-database
...
executed `python3 src/provider/update.py ../provider-db/_providers/ > src/provider/data.rs`
2020-09-22 10:35:04 +02:00
Friedel Ziegelmayer
0c03024b97
feat: update dependencies
...
* feat: update dependencies
updates
- pgp
- async-std
- surf
- mailparse
* simplify dev deps
* more deps
* fixup
* fixup
2020-09-21 23:53:53 +02:00
bjoern
184f303b54
Merge pull request #1938 from deltachat/summary-regexp
...
get_summarytext_by_raw: drop leading and trailing whitespace
2020-09-21 18:26:45 +02:00
Hocuri
637d2661e8
Show better errors when configuring ( #1917 )
...
* Show all errors when configuring
* Shorten some overly long msgs
2020-09-21 15:06:33 +02:00
Alexander Krotov
fc0e88539a
get_summarytext_by_raw: drop leading and trailing whitespace
...
Also remove unnecessary use of regexp.
2020-09-20 23:51:52 +03:00
Alexander Krotov
c124eadf9d
Emit chat modification event on contact rename
2020-09-20 00:45:36 +03:00
Alexander Krotov
97b1a1c392
Set contact ID in event related to contact blocking
2020-09-19 22:01:45 +03:00
Alexander Krotov
fe1c99c5e8
Set contact ID in ContactsChanged on modification
2020-09-19 22:01:45 +03:00
Alexander Krotov
332a387c98
Fix nightly clippy warnings
2020-09-19 17:49:32 +03:00
bjoern
92abae0b5b
Merge pull request #1901 from deltachat/validate-system-date
...
add device-message on bad system clock or on outdated app
2020-09-19 13:41:17 +02:00
bjoern
81db6e3ee2
Merge pull request #1927 from deltachat/newacc-transaction
...
sql: create new accounts in one transaction
2020-09-19 13:22:28 +02:00
B. Petersen
af67e798fb
warn about outdated app
2020-09-19 12:40:03 +02:00
B. Petersen
4090120041
make sure, new added device messages are always at the end of the chat
2020-09-19 12:40:02 +02:00
B. Petersen
49f07421ec
add a test that checks maybe_warn_on_bad_time() adds a new message only every day
2020-09-19 12:40:02 +02:00
B. Petersen
7b38d6693d
add a device-message if the system clock seems to be inaccurate
2020-09-19 12:40:02 +02:00
B. Petersen
277bbfaead
add a function to get the timestamp of the last provider-db update
2020-09-19 12:40:02 +02:00
Alexander Krotov
238c4bb792
sql: set PRAGMA temp_store=memory
...
On Android, there is to /tmp directory, so SQLite may throw
SQLITE_IOERR_GETTEMPPATH when trying to find a place for temporary
files. Storing temporary files in memory is a workaround that always
works (until out of memory).
See https://github.com/mozilla/mentat/issues/505 for discussion of a
similar issue.
2020-09-19 00:10:12 +03:00
Alexander Krotov
0485c55718
sql: create new accounts in one transaction
...
This prevents SQLite from synchronizing to disk after each statement,
saving time on high latency HDDs.
2020-09-18 19:41:41 +03:00
Hocuri
99a36e8629
rustfmt
2020-09-17 17:29:29 +02:00
Hocuri
6253a2cef7
.
2020-09-17 12:27:57 +02:00
Hocuri
aee6eb2261
{:#} once more
2020-09-17 09:39:14 +02:00
Hocuri
6d6ac66f4d
Show dbfile when opening fails
2020-09-16 17:24:04 +02:00
Hocuri
4ed2638594
Also show the inner error
2020-09-16 16:02:25 +02:00
Hocuri
b892dafa49
Clippy
2020-09-16 15:17:56 +02:00
Hocuri
e870b33e03
Revert "Just for testing, let importing the db always fail - .context() just overwrites the underlying error!!!!!"
...
This reverts commit 27e53ddbff .
2020-09-16 15:05:05 +02:00
Hocuri
27e53ddbff
Just for testing, let importing the db always fail - .context() just overwrites the underlying error!!!!!
2020-09-16 15:00:36 +02:00
Hocuri
396ccebb5c
Log more
2020-09-16 15:00:22 +02:00