Commit Graph
100 Commits
Author SHA1 Message Date
bjoern 3c43d790a3 update chat/contact data only when there was no newer update (#2642)
* check update timestamps for signatures, user-avatars, ephemeral-settings, last-subject

* check update timestamp for group-avatars

* check update timestamp for group-names

* check update timestamp for memberlist

* check update timestamp for protection-settings

* add a more advanced test

* add another more advanced test

* set last-subject-timestamp more carefully

* bubble up errros from set_*timestamp() and check for from_id==0 before

* simplify Params::set_i64()

* remove comment that is more confusing than helpful

* use update_timestamp() wording consistently
2021-09-04 22:16:39 +02:00
bjoern 444486f5df better readable code fragments on c.delta.chat (#2647)
* better readable code fragments on c.delta.chat

* make it even a bit nicer
2021-09-04 17:10:05 +02:00
bjoern 71e0493c4a add device message if quota is exceeding (#2621)
* resultify update_recent_quota()

* add a device-message if quota exceeds QUOTA_WARN_THRESHOLD_PERCENTAGE

* check if a quota warning should be added during housekeeping, this is at least once a day

* dc_get_config("quota_exceeding") is useful for bots

* make clippy happy

* reword QuotaExceedingMsgBody message

* avoid lots of warnings if quota jitters around the warning threshold

* allow clippy::assertions_on_constants

these constants depend on each other, it makes sense to check that they are not changed in an incompatible way
2021-08-26 15:31:25 +02:00
bjoern d0c97bce4c tweak quota display (#2616)
* resultify get_connectivity_html()

* tweak quota titles, avoid confusing 'quota' wording

* show bars for quota usage

* skip secondady 'Storage' title, see comment for reasoning
2021-08-22 12:46:46 +02:00
bjoern d0bfb555dd prepare 1.59 (#2614)
* update changelog for 1.59.0

* bump version to 1.59.0
2021-08-20 18:20:06 +02:00
bjoern 6ffaa38b37 add 'device chat about' to now existing status (#2613)
the 'device chat about' was shown as a single message
as at that time, there was just not 'status'.

meanwhile, we have the status option,
and it feels much more natural to get the information there,
esp. as the subtitle on all UIs already read
'Messages in this chat are generated locally' -
and a tap on that will show the hint, without scrolling or so.

this also teaches the user where to find such information -
and the "welcome" chat is less spammy and really starts with the text
"Welcome to Delta Chat!"
2021-08-20 12:30:55 +02:00
bjoern 339d46ecf0 update provider database, add yggmail and mail2tor (#2608)
* allow dotless domains and hostnames

* update provider database

ran ./src/provider/update.py ../provider-db/_providers/ > src/provider/data.rs
to pull in recent changes from https://github.com/deltachat/provider-db
2021-08-20 10:48:27 +02:00
bjoern 5399c9151d Add Quota to Connectivity View (#2612)
* add imap::get_quota_roots()

* schedule quote-checking job on getting connectivity-html

* get quota and debug print it

* basic quota output

* update quota at most once per minute, emit event on changes

* use more meaningful names

* add some comments, move update_recent_quota() to quota.rs

* show root name only if there are several roots

* make clippy happy, some refactorings

* allow only one update-quota job per time

* add now supported QUOTA to standards.md
2021-08-20 10:40:24 +02:00
bjoern 53cd633e8d add migrated accounts to events emitter (#2607)
successor of #2559
closes #2606
2021-08-16 22:10:34 +02:00
B. Petersen b8dad1dbaf add support for socket PLAIN coming from provider-db 2021-08-15 20:28:09 +03:00
bjoern c09a83df2b prepare 1.58 (#2584)
* update changelog for 1.58.0

* bump version to 1.58.0
2021-08-02 21:55:32 +02:00
bjoern 8729d2c4aa also move WAL file when moving database (#2583)
the WAL files come from sqlite WAL mode,
they have the same name as the database file with an extra `-wal` suffix.

according to https://sqlite.org/wal.html#the_wal_file ,
the WAL file is part of the persistent state of the database
and should be kept with the database if the database is copied or moved.
2021-08-02 20:43:46 +02:00
bjoern 3712524765 prepare 1.57 (#2580)
* update changelog for 1.57.0

* bump version to 1.57.0
2021-08-01 21:08:08 +02:00
bjoern 57870ec54a remove archived count suffix (#2566)
"Archived Chats" also contain old contact requests now
(an maybe new one if the user archives them),
so, there may be easily some thousands chats in "Archived Chats" -
and the count has no real meaning to the user,
esp. as we not even display the number of "Real Chats".

Might be that this "Link" will go away anyway sooner or later,
however, for now, it is just fine to remove the badge counter.
2021-07-28 17:53:12 +02:00
bjoern a6e1dc4f16 update provider database (#2565)
ran ./src/provider/update.py ../provider-db/_providers/ > src/provider/data.rs
to pull in recent changes from https://github.com/deltachat/provider-db
2021-07-28 15:22:02 +02:00
bjoern 9a77a7b66f fix archiving requests (#2563)
* add a test for archived requests

* fix archived requests

* move requests but the last one to "Archived Chats"

this way, the app looks familiar after the contact request upgrade.
the subselect was copied from the old get_last_deaddrop_fresh_msg()
(which was removed by the contact request upgrade #2514)

* just move all old requests to "Archived Chats"

ux-wise, the advantage of keeping the last one is questionable,
one may think, always the last one is shown in chatlist.

showing _all_ fresh request is not doable
as past cores did not really take care of that
and the db-state is not consistent in that regard.

that would make the already complicated code even more complicated,
so we decided to go the easy way.
2021-07-28 14:56:54 +02:00
bjoern 980d2a9433 add dc_accounts_maybe_network_lost() (#2550) 2021-07-22 11:29:51 +02:00
bjoern 5f365b259b tweak connectivity html (#2549)
* escape strings added to html

* use more common emojis for connectivity report

all emojis are from 2010 and older now.
an alternative would have been to use css,
however, that may have other issues
and as the whole report is subject to change anyway,
i go for the easy solution.

* use 'modern' meta pattern, remove unused div and styles

* use css instead emojis; looks better that way

also, we have the same look on all systems.

* add connectivity command to repl tool
2021-07-21 23:02:09 +02:00
bjoern 188353d581 add in-doc links for DC_EVENT_CONNECTIVITY_CHANGED, list unused param as for the other events (#2542) 2021-07-17 12:39:05 +02:00
B. Petersen e77651f2f5 clarify docs 2021-06-30 00:02:15 +02:00
B. Petersen 056f3ecf03 remove dc_accounts_import_account() api
in most (all?) UIs, import/export works on an already created account,
so, dc_accounts_import_account() does not really help here -
but adds some noise and confusion
eg. as for the other dc_accounts_t functions,
the corrsponding dc_context_t functions must not be called.

if really a new account is required for import,
it seems to be easier to call add_account() before import.
2021-06-30 00:02:15 +02:00
B. Petersen 15c38ba395 token::save() resultified, doc updated 2021-06-25 23:09:31 +02:00
B. Petersen 70e776e407 refine general dc_check_qr() documentation 2021-06-25 23:09:31 +02:00
B. Petersen 6b5ba35d5b make clippy happy 2021-06-25 23:09:31 +02:00
B. Petersen 7b9e54be56 return unique token for new qr codes
as by reviving qr codes,
there may be more than one token for a chat,
ensure, the most recent token and only one token is returned
by the sql-command for looking up tokens
(used for generating new codes)
2021-06-25 23:09:31 +02:00
B. Petersen 6202f85a6f test withdrawing qr codes 2021-06-25 23:09:31 +02:00
B. Petersen 8ac2bd0298 handle withdraw/revive qr code actions 2021-06-25 23:09:31 +02:00
B. Petersen 3f00a6efbe allow token::save() to handle existing tokens 2021-06-25 23:09:31 +02:00
B. Petersen 514c4bc8a7 test removing the last, seletected account
this just result again in no accounts.
before, get_selected_account() has paniced.
2021-06-19 02:31:57 +03:00
B. Petersen b53613d1e0 let get_selection_account return an Option<> 2021-06-19 02:31:57 +03:00
B. Petersen 4c4f24fb35 avoid creating a default account, adapt tests
the default account created by dc_accounts_new()
is annoying when doing a migrate/import account;
in this case, you must not forget to remove the default account.
in between you have two account,
and accounts are swiched.

it seems to be better
to just call add_account() on a new account object as needed.
2021-06-19 02:31:57 +03:00
B. Petersen 475fa24876 move links to angle brackets to avoid rustdoc errors 2021-06-19 01:39:04 +03:00
B. Petersen a638259c36 add a test to make sure, the selected account is persisted on reopening 2021-06-14 22:07:35 +02:00
B. Petersen 991d15615e fix minor dbversion inconsistencies
probably they come in by the latest sqlx<->rusqlite moves,
however, as they are followed by subsequent migrations,
that should not have been a big bug in the past
(maybe unless the app was killed at a bad moment)
2021-06-12 16:03:55 +02:00
B. Petersen 5dee1efa59 add missing dbversion update 2021-06-12 16:03:55 +02:00
B. Petersen 1870684c43 add a test that catches some cases where dbversion was forgotten to update 2021-06-12 16:03:55 +02:00
B. Petersen c07c5bb358 create own topic for Voice messages, update year 2021-06-11 13:09:04 +02:00
B. Petersen 67f8fb4b66 update spec to Chat-Content: sticker 2021-06-11 13:09:04 +02:00
B. Petersen 056721b916 update spec to new Chat-User-Avatar usage 2021-06-11 13:09:04 +02:00
B. Petersen 4fe3a80f96 allow stickers with gif-images 2021-06-11 13:08:48 +02:00
B. Petersen 6c530b4c77 test sending and receiving stickers 2021-06-11 13:08:48 +02:00
B. Petersen c616b65ce4 allow sending stickers via repl tool 2021-06-11 13:08:48 +02:00
B. Petersen 8b872b7e6f bump version to 1.56.0 2021-06-07 21:55:51 +02:00
B. Petersen 29356a6ca8 update changelog for 1.56.0 2021-06-07 21:55:51 +02:00
B. Petersen b017af78ce update provider database
ran `./src/provider/update.py ../provider-db/_providers/ > src/provider/data.rs`
to pull in recent changes from https://github.com/deltachat/provider-db
2021-06-07 16:19:05 +02:00
B. Petersen e387b4f4dd bumb version to 1.55.0 2021-05-11 13:58:46 +02:00
B. Petersen 88a10eaf2c update changelog for 1.55.0 2021-05-11 13:58:46 +02:00
B. Petersen c4f36836d4 clarify tagging hint 2021-05-03 17:19:15 +02:00
bjoern 553f4c4b88 prepare 1.54 (#2412) 2021-05-03 02:50:20 +03:00
B. Petersen f7139331e7 test that the correct headers are moved 2021-05-01 07:40:56 +03:00
B. Petersen f40b557454 add tests for marknoticed_chat(), markseen_msgs() and get_state() 2021-04-26 23:15:26 +02:00
B. Petersen e1b9e8f2c9 stop more times in repl tool 2021-04-26 23:15:26 +02:00
B. Petersen 65c17cfea2 dc_markseen_msgs() should not handle deaddrop
messages are marked as 'noticed' already when the chat is opened
as all UIs call dc_marknoticed_chat();

also marking messages as 'noticed' when dc_markseen_msgs() is called
is not needed therefore - but stands in the way of further improvements
for the deaddrop, eg. UI may let the user decide when the deaddrop
can be removed from chatlist ('All done' button or so)
2021-04-26 23:15:26 +02:00
B. Petersen 39d3a594af let dc_marknoticed_chat() also handle the virtual deaddrop chat 2021-04-26 23:15:26 +02:00
B. Petersen 143c5e6249 re-add test_db_reopen() for rusqlite
so that we do not forget about that test
and the issues we had with that :)
2021-04-25 22:33:14 +03:00
B. Petersen 34ffa4e7ea add a test to check LIMIT on global searches 2021-04-20 13:51:49 +02:00
B. Petersen 3f1623eab1 LIMIT global search 2021-04-20 13:51:49 +02:00
B. Petersen 61bf0b208c add some tests for constants 2021-04-19 23:09:27 +03:00
B. Petersen 2688f233b8 add timeinfo for 'listmsgs' repl command 2021-04-18 00:51:51 +02:00
B. Petersen 7be8fb7245 bumb version to 1.53.0 2021-04-18 00:51:51 +02:00
B. Petersen a9b8776342 update changelog for 1.53.0 2021-04-18 00:51:51 +02:00
B. Petersen 9ecb6d9b15 test dehtml for pre-tag (wrote that little test to test the new coverage script :)[D 2021-04-15 01:49:12 +03:00
B. Petersen cc6b02f037 remove additional tags: check from ci, it is 'master branch || has tags' so that does not make much sense, generation should be done on master only 2021-04-14 16:55:45 +02:00
B. Petersen e13bb8fbd4 bump version to 1.52.0 2021-04-14 16:55:45 +02:00
B. Petersen eaca4446aa update changelog to 1.52 2021-04-14 16:55:45 +02:00
B. Petersen f3fb26c066 add a test to search for one-to-one-chats coming without authnames 2021-04-14 14:09:35 +02:00
B. Petersen 1a1416e446 change chat names correctly on contact name change
the user-given contact name may be set to an empty string;
in this case the authname or the email is used for the contact
and also for the name of possibly existing chats.

this works well for `dc_chat_get_name()` as that just uses
`dc_contact_get_display_name()` for single-chats.

it did not work for `dc_get_chatlist(query)` as that
uses the database for performance reasons -
however, in the database, the empty string is written
instead of the display name is written for a chat.

this is fixed by this pr by also using
dc_contact_get_display_name() when updating the chats-table
(similar to `dc_create_chat_by_contact_id()`)
2021-04-14 14:09:35 +02:00
B. Petersen 0afc07f6e7 add a test to search for one-to-one-chats 2021-04-14 14:09:35 +02:00
B. Petersen 96e57e7ef3 bump version to 1.51.0 2021-03-23 18:51:26 +01:00
B. Petersen 02bc334af5 update changelog for 1.51 2021-03-23 18:51:26 +01:00
B. Petersen 36aef6499d update provider database 2021-03-18 21:55:33 +01:00
B. Petersen 4ba9c2fafa fix clippy error on generating rust code from python 2021-03-18 21:55:33 +01:00
B. Petersen db3f87dd77 add a test that fails if 'References:'-header is missing 2021-03-14 14:38:53 +01:00
B. Petersen f43555b41c set References header to Message-ID on top-level messages to add some resilience against smtp-server changing Message-ID header 2021-03-14 14:38:53 +01:00
B. Petersen 4ab90f7069 add DoxygenLayout.xml file
`DoxygenLayout.xml` is picked up by doxygen automatically (as `Doxyfile`)
and its template can be generated by `doxygen -l DoxygenLayout.xml`.

after that, the following tweaks were done:
- remove all xml-parts but header (other defaults are fine so far)
- rename "Modules" header to "Constants" (there are no modules :)
- remove useless subitems from "Classes", eg. by name only shows as "d"
- reorder tabs so that "Classes" becomes the first one
2021-03-13 22:19:12 +03:00
B. Petersen 6963fd877d allow one additional boolean
the function is not complex and is only called once.
refactoring that seems to be a bit too much effort
and at least out of scope of this pr.
2021-03-12 11:30:25 +01:00
B. Petersen 045fbab7cd remove subsequent images inside multipart/related 2021-03-12 11:30:25 +01:00
B. Petersen f69bcc71ed mark child-parts of multipart/related as such 2021-03-12 11:30:25 +01:00
B. Petersen c1fddebc06 add test for multipart/related mails 2021-03-12 11:30:25 +01:00
B. Petersen 8703da83f5 comment in more detail about DC_DESIRED_TEXT_LEN and use old limit that had worked for some while okayish 2021-03-04 23:26:02 +01:00
B. Petersen 4ae86b4e61 truncate long texts and make the whole text accessible via has_html()/get_html() 2021-03-04 23:26:02 +01:00
B. Petersen e418d89c79 add failing test to test truncating 2021-03-04 23:26:02 +01:00
B. Petersen 6f4090fbf6 make clippy happy and avoid unneeded evaluation 2021-03-04 23:24:59 +01:00
B. Petersen 29cbbf9ce8 let get_html() return first instead of last text
usually, there is at most one text/html and one text/plain part.

multiple text/plain parts,
are known only by mailinglist software that wants to add a footer
but cannot alter the original content part -
maybe because it is html and things are hard to stitch
or maybe because the content part is cryptographically signed
and cannot be altered therefore.
2021-03-04 23:24:59 +01:00
B. Petersen cd3c2a6c6c add test with multiple text parts
the test has multiple text parts because
the content text is signed and
the mailinglist software wants to add some text
(and cannot alter signed part without breaking the signature)
2021-03-04 23:24:59 +01:00
B. Petersen 27a7fae9c6 add a test checking get_fresh_msgs() in combination with mute_until 2021-03-03 12:02:58 +01:00
B. Petersen 1deaf87b24 fix mute-condition in get_fresh_msgs() 2021-03-03 12:02:58 +01:00
B. Petersen 75adbd2c8f add mute options to repl tool 2021-03-03 12:02:58 +01:00
B. Petersen 5c2d6c22a0 remove additional text parts if we think they belong to a mailinglist footer 2021-02-28 21:03:39 +01:00
B. Petersen 40d7f3ff71 add failing test for mailinglists with footer in an extra mimepart 2021-02-28 21:03:39 +01:00
B. Petersen c3dd47beba add test for muting/unmuting wrt fresh messages 2021-02-27 21:08:53 +01:00
B. Petersen f9c5ad817b resultify get_fresh_msgs(), this will make eg. test fail on bad sql 2021-02-27 21:08:53 +01:00
B. Petersen 81cd577bf0 exclude muted chats from notified-list 2021-02-27 21:08:53 +01:00
B. Petersen f789de7044 get mailinglist name from From: if sender indicates a notification list 2021-02-27 00:03:30 +01:00
B. Petersen b035a721ef add a failing test for mailing list names hidden in 'From' 2021-02-27 00:03:30 +01:00
B. Petersen 38169b2aad check From: address without creating/altering a contact-record if it is not SELF 2021-02-24 14:53:52 +01:00
B. Petersen f973b75d6a unblock mailinglists via existing block-api
blocked mailinglists addresses are added to the contact table
before blocked contact list is created -
(this allows unblocking of blocked lists in previous testing releases,
however, more importantly, it keeps all blocking/unblocking code inside
contacts)

on unblocking such a contact,
the corresponding chat is unblocked as well.
2021-02-23 17:57:26 +01:00
B. Petersen a9aeea0ffc add failing test trying to unblock mailinglist 2021-02-23 17:57:26 +01:00
B. Petersen 79e72418bb resultify Contact::get_all_blocked() 2021-02-23 17:57:26 +01:00
B. Petersen 01af3b7547 fix sorting of blocked contacts (successor of #2206) 2021-02-23 17:57:26 +01:00