Commit Graph
100 Commits
Author SHA1 Message Date
bjoern c8fe81e21d Merge pull request #1243 from Ampli-fier/master
Minor changes in comments
2020-02-09 12:01:31 +01:00
B. Petersen cce32229e0 do not bubble up errors on dc_has_import()
error!() will show the error directly to the user,
this is not useful in this case,
and also the message with the function-name is not for the end-user.

instead, the ui shall (and already does)
show some explaining text if dc_has_import() returns false;
the error!() is disturbing here as this results in two hints shown to the user.
2020-02-01 22:33:18 +00:00
bjoern 24edd83c8a Merge pull request #1207 from deltachat/provider-db
streamline provider-db
2020-01-30 23:33:04 +01:00
B. Petersen 268c5b6482 update provider-db 2020-01-30 23:31:44 +01:00
B. Petersen a66a754126 use EmailAddress object correctly 2020-01-30 17:47:43 +01:00
B. Petersen 18059734ce make 'cargo fmt' happy with generated code: avoid two lineends at end of file 2020-01-30 17:47:43 +01:00
B. Petersen c883e709c3 make sure, a domain is not used twice 2020-01-30 17:47:43 +01:00
B. Petersen 7be0bd3583 skip providers without data, cleanup 2020-01-30 17:47:43 +01:00
B. Petersen d9ab37ea58 check for missing before_login_hint 2020-01-30 17:47:43 +01:00
B. Petersen ff075ba612 update provider-db 2020-01-30 17:47:42 +01:00
B. Petersen 9c9294a730 use P_DOMAIN_NAME instead of P_123 to make a diff easier, make sure, domains are lowercase 2020-01-30 17:47:42 +01:00
B. Petersen 2a0842b8ae rough check for valid domains 2020-01-30 17:47:42 +01:00
B. Petersen 3cfe45ffc2 disable a clippy warning, add a comment on that 2020-01-30 17:47:42 +01:00
B. Petersen 80dc7bfc52 make 'cargo fmt' happy 2020-01-30 17:47:42 +01:00
B. Petersen 10f26f17ba replace provider/data.rs by auto-generated file 2020-01-30 17:47:42 +01:00
B. Petersen 4ba7402f28 tweak yaml->rust script, generated code compiles and works now :) 2020-01-30 17:47:42 +01:00
B. Petersen d4da2e0d9c add update.py that takes a folder with yaml-md-files as argument 2020-01-30 17:47:41 +01:00
B. Petersen b180d004ba use structure as suggested by @dignifiedquire 2020-01-30 17:47:41 +01:00
B. Petersen de5bd96f08 add some more tests 2020-01-30 17:47:41 +01:00
B. Petersen 3a05b5dacc target comment of @Simon-Laux, use a subdirectory 2020-01-30 17:47:41 +01:00
B. Petersen b3c4e32b68 split provider-database from code to allow easy generation 2020-01-30 17:47:41 +01:00
B. Petersen 375a48f135 add before_login_hint to device-chat on successfull logins 2020-01-30 17:47:41 +01:00
B. Petersen 1750ab92e6 actually use server/port/etc. from provider-db, remove hardcoded nauta-settings 2020-01-30 17:47:41 +01:00
B. Petersen 8364ddd10b get and test concrete server-data 2020-01-30 17:47:41 +01:00
B. Petersen 63043cb45d add after_login_hint, refine ffi 2020-01-30 17:47:40 +01:00
B. Petersen aaa6497659 add server data for nauta to provider-db 2020-01-30 17:47:40 +01:00
B. Petersen 7d0dcfb3a5 refine example 2020-01-30 17:47:40 +01:00
B. Petersen a97ea0ad63 adapt python tests 2020-01-30 17:47:40 +01:00
B. Petersen da66a4d22f make clippy happy 2020-01-30 17:47:40 +01:00
B. Petersen 748e54d4c2 add basic provider-functions 2020-01-30 17:47:40 +01:00
B. Petersen 0f172595d7 we need the provider-db also in the core, not only ffi. the idea is to add it directly to the core and to avoid an extra crate. this also avoids pulling in yaml-rust and some other dependencies. 2020-01-30 17:47:39 +01:00
B. Petersen 5ffdbd99e8 adapt python bindings, remove tests until we really have data 2020-01-30 17:47:39 +01:00
B. Petersen fbe57c4c71 adapt provider-db api to real need 2020-01-30 17:47:39 +01:00
B. Petersen a80632ab36 use RECOMMENDED_FILE_SIZE also for sys.msgsize_max_recommended 2020-01-28 23:32:38 +03:00
B. Petersen 49fdd6fc5b clarify documentation 2020-01-26 16:23:30 +01:00
B. Petersen 5e91c74304 instant success on simple qr-setup-contact
this changes the behavior when scanning a setup-contact qr-code.
instead of waiting, until the whole protocol is finished,
which may take something between 10 seconds and several minutes,
the dc_join_secure_join() returns instantly;
the uis typically show the created chat then.

the returned chat-id is the same than if we wait for the protocol to finish,
it is the opportunistic one-to-one chat-id, so no changes there.

all this works even when both devices are offline.

after dc_join_secure_join() returns, however,
the usual setup-contact continues. ux-wise, once the protocol finishes,
a system-info-messages is added to the chat (also unchanged),
this is directly visible, in the chat as well as in the chatlist.
while the prococol runs, the user can alredy send message to the chat,
or do other things in the app.

if the user scans a new qr-code while an existing protocol is not finished yet,
the old join will be aborted (however, of course, created chats are kept).
we could also allow multiple joins at the same time,
however, this would be much more effort that this little change
and i am not sure if it is worth the effort.

finally, if a verified-group shall be joined,
this is not possible instantly, this is not affected by this pr.
same for unverified-groups, however, this could maybe be improved,
but also here, not sure if it is worth the effort
(i think most scans are setup-contact scans)
2020-01-26 16:23:30 +01:00
bjoern 918b8036ea Merge pull request #1223 from deltachat/prep-beta24
prepare 1.0.0-beta24
2020-01-26 14:22:57 +01:00
B. Petersen 7ea0e4d4db bump version to 1.0.0-beta.24 2020-01-26 14:06:33 +01:00
B. Petersen 622c1705aa changelog 2020-01-26 13:49:10 +01:00
B. Petersen 99e30d561d fix oauth2 login by fixing a Serde call
oauth2 crashes in beta23
because we did not let Serde remove the quotes from a parsed JSON email-address.

for autoconfig, we try to get a well-known URL
containing the domain of the used address - with the quote that is
https://autoconfig.gmail.com"/mail/config-v1.1.xml?...

unfortunately, instead of just returning an error,
(the url does not exist anyway)
reqwest crashes on the attempt to get this URL.

the Serde-thing is not obvious to me:
while serde_json::Value.as_str() removes the quotes,
serde_json::Value.to_string() does not.
2020-01-26 12:28:42 +00:00
bjoern 938d5828fc Merge pull request #1212 from deltachat/handshake-ignore
do not delete handshake messages possibly belonging to secure-joins on other devices
2020-01-25 15:41:20 +01:00
B. Petersen d74b06f8bf target comment of @flub 2020-01-24 21:22:12 +01:00
B. Petersen c54e211147 do not delete handshake messages maybe belonging to secure-joins on other devices 2020-01-24 12:50:26 +01:00
B. Petersen 8817cf5116 don't make me think 2020-01-24 12:32:45 +01:00
B. Petersen 0043e95ba7 fix message deletion on server
before a message is actually deleted,
we verify that server_folder+server_uid matches the Message-ID,
so that we do not delete the wrong message by accident.
the reason for that is that, to my knowledge, server_folder+server_uid
are not necessarily stable but Message-ID is.

anyway, this check was broken and set the server_uid to 0 in all cases -
where it should be set to 0 _only_ on mismatches.
2020-01-21 16:27:21 +03:00
B. Petersen f7b23fb0e2 check that recoding of jpg and png files actually works 2020-01-18 00:30:21 +03:00
B. Petersen 42f7abf2f5 for test_selfavatar*(), use the same function signature as for other tests 2020-01-18 00:30:21 +03:00
B. Petersen 578e4b2785 re-add some comment to the securejoin-flow 2020-01-16 17:06:24 +01:00
B. Petersen 73c69c3f93 fix optimisation 2020-01-13 01:43:27 +01:00
bjoernandAlexander Krotov 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
bjoern 8a394fb08f Merge pull request #1141 from deltachat/add-missing-event
send DC_EVENT_CHAT_MODIFIED when adding members to a group
2020-01-07 13:46:17 +01:00
B. Petersen 4b7b6d6cb3 send DC_EVENT_CHAT_MODIFIED when adding members to a group (removing is already fine) 2020-01-06 23:35:27 +01:00
B. Petersen 91eea03b18 hide messages with Secure-Join headers if the Secure-Join fails 2020-01-05 22:06:06 +01:00
björn petersen ff175e661b Merge pull request #1130 from deltachat/fpr-without-addr
handle plain OPENPGP4FRP qr-codes correctly
2020-01-01 21:49:37 +01:00
B. Petersen fe741f168a fix early exit on empty addresses in decode_openpgp() 2020-01-01 18:53:35 +01:00
B. Petersen eaaf500d5e add failing test for plain OPENPGP4FRP-qr-code 2020-01-01 18:52:00 +01:00
björn petersen 05f85b33c5 Merge pull request #1124 from deltachat/mimeparser_message_kml
Location streaming fixes
2019-12-31 16:49:08 +01:00
B. Petersen b7a2d17e93 remove weird comment 2019-12-29 18:58:49 +00:00
B. Petersen e1bd740249 init authname when received by From: header (it is also updated from there) 2019-12-29 18:58:49 +00:00
B. Petersen de52c2da80 add failing test for receiving authnames 2019-12-29 18:58:49 +00:00
B. Petersen d87b676d60 do not abort search completely when updating a special name fails 2019-12-27 22:53:03 +00:00
B. Petersen f73ba895af remove some meanwhile unneeded allow-statements 2019-12-26 16:26:06 +00:00
B. Petersen cb2a1147f0 fix searching for localized device chats 2019-12-26 16:23:42 +00:00
B. Petersen 6702ef4a71 add a failing test that does not fine localized device chats 2019-12-26 16:23:42 +00:00
björn petersen f61846dec9 Merge pull request #1107 from deltachat/list-language-bindings
list language bindings in README
2019-12-26 01:35:31 +01:00
B. Petersen 4776e196da add frontend projects to README 2019-12-26 00:42:07 +01:00
B. Petersen 839a48b678 list language bindings in README 2019-12-26 00:42:07 +01:00
B. Petersen 5bfbae4b00 add test for delete_and_reset_all_device_msgs() 2019-12-22 05:44:09 +01:00
B. Petersen 521a854635 delete and reset device-messages on import; this avoids wrong information in the device chat and allows adding correct information again 2019-12-22 05:44:09 +01:00
B. Petersen ce15ef2db9 prep beta22 2019-12-22 05:42:33 +01:00
björn petersen 7fac71aa81 Merge pull request #1094 from deltachat/tweak-repl
use println!() for all repl outputs
2019-12-21 16:00:27 +01:00
B. Petersen 7d51c1140d use println!() for all repl outputs
in the very beginning, we allowed using the cmdline partly from the ui
via a special function; this made info!() handy.
however, this is long gone and no longer needed.
2019-12-21 13:09:38 +01:00
B. Petersen 7f6a1ad1a7 add some empty lines to enums & co to make things more readable and to avoid errors this way :) 2019-12-20 12:55:42 +01:00
björn petersen 3afa37c6ea Merge pull request #1075 from deltachat/prepare_beta20
prep 1.0.0-beta.20
2019-12-19 17:17:26 +01:00
björn petersen 22f5c5fb74 Merge pull request #1057 from deltachat/beta18
prepare to tag 1.0.0-beta.18
2019-12-16 15:00:48 +01:00
björn petersen 898e641256 Merge pull request #1048 from deltachat/beta17
add changelog for beta17 and bump versions
2019-12-15 23:32:11 +01:00
B. Petersen ba274482f7 make d.png much smaller in size to avoid avatar-recoding and to allow checking file contents 2019-12-15 23:12:37 +01:00
B. Petersen 435f734d60 adapt tests for new avatar recoding 2019-12-15 23:12:37 +01:00
B. Petersen a5f949c4e2 recode group- and user-avatar to 192x192 pixel 2019-12-15 23:12:37 +01:00
B. Petersen 9fc556864e add image crate 2019-12-15 23:12:37 +01:00
B. Petersen 95fbc904d1 go to correct step so that param_autoconfig is actually used 2019-12-14 00:12:14 +01:00
B. Petersen ce37a8dda2 use provider-database only if the user did not enter a server/port/whatever manually; this allows the user to override erroneous choices 2019-12-14 00:12:14 +01:00
B. Petersen 0a9f880fb4 remove another superfluous return value 2019-12-13 01:17:48 +01:00
B. Petersen 888507f7ba test group- and user-avatars in the same mail 2019-12-13 01:17:48 +01:00
B. Petersen 29866092de adapt the protected-header test; protected-headers really require encryption now and parts of the tests are know to fail now. however, protected-headers are also tested in python implicitly in several places 2019-12-13 01:17:48 +01:00
B. Petersen 36fc2c83f2 return selfavatar from dc_get_info() 2019-12-13 01:17:48 +01:00
B. Petersen f6861ca5f5 target comments from @flub and @dignifiedquire 2019-12-13 01:17:48 +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 a8842da50a && has a higher precedence than || - fix a logical error when resetting Unpromoted 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 ab12a4eb39 move ImageAction parsing to a reusable function 2019-12-13 01:17:48 +01:00
B. Petersen c3fd0889e2 use tri-state ImageAction instead of Option<Option> 2019-12-13 01:17:48 +01:00
B. Petersen c62532a665 adapt to new HeaderDef api 2019-12-13 01:17:48 +01:00
B. Petersen ca63d6ba1c handle incoming profile-images 2019-12-13 01:17:48 +01:00
B. Petersen a1f496b019 let mimeparser handle profile-images 2019-12-13 01:17:48 +01:00
B. Petersen da421438cd do not send selfavatar on existing installation without resetting 2019-12-13 01:17:48 +01:00