Commit Graph
1590 Commits
Author SHA1 Message Date
holger krekel 4eb068613d extend and fix python/test side of location streaming 2019-11-03 00:21:27 +01:00
holger krekel d774430ec2 simplify location parsing 2019-11-03 00:21:27 +01:00
holger krekel d24a982757 fix various location-streaming issue, test passes now 2019-11-03 00:21:27 +01:00
holger krekel d74c70a57c fix and streamline location-outgoing pipeline 2019-11-03 00:21:27 +01:00
B. Petersen e6d9991581 fix conversion from nanoseconds to milliseconds
1_000_000 nanosecond = 1 millisecond
2019-11-02 15:22:27 +01:00
B. Petersen 832df41130 target comments of @hpk42 and @flub 2019-11-01 00:46:48 +01:00
B. Petersen 5709681076 streamline as_path_unicode(), delete unused as_str() and as_str_safe() 2019-11-01 00:46:48 +01:00
B. Petersen 858baf0c2c prefer to_opt_string_lossy() over as_opt_str() as the latter pancis on non-wellformatted utf-8, delete as_opt_str() 2019-11-01 00:46:48 +01:00
B. Petersen e4b3e23769 prefer to_string_lossy() over as_str() as the latter pancis on non-wellformatted utf-8 2019-11-01 00:46:48 +01:00
holger krekel 7f8c6d8cca some more display refinements 2019-10-31 23:31:09 +01:00
holger krekel 75ba040531 more error logging with file operations in general 2019-10-31 23:31:09 +01:00
Floris Bruynooghe faa78e1c04 At least log the error 2019-10-31 22:38:32 +01:00
Floris Bruynooghe b264d3be3c Be more accepting in creating blobs from existing names
This is an additional fix for #768 aka
commit eac8ad8369
2019-10-31 20:05:09 +01:00
B. Petersen 4e37610f21 fix boolean error in chatlist::get_msg_id()
the error led to unusable contact requests,
at least on android and ios (probably also desktop)
because msg_id=dc_chatlist_get_msg_id() always returns 0
and create_chat_by_msg_id(msg_id)
or dc_marknoticed_contact(<get sender from msg_id>)
failed therefore.
2019-10-31 12:31:31 +01:00
Floris Bruynooghe 78030e4a31 Add test for #767
Without a test for this fix, a regression will happen again.

Original PR #767 aka commit 4fed875107
2019-10-30 21:08:25 +01:00
holger krekel c56c10bced remove unneccessary check of is_special() + cleanups 2019-10-30 19:29:13 +01:00
holger krekel b0ccbc36d9 fix FFI-behaviour: return default empty messages when asked for special ones 2019-10-30 19:29:13 +01:00
holger krekel 41443bb7f9 fix sending of autocrypt setup message 2019-10-30 15:48:06 +01:00
B. Petersen 8b5f7d98f6 do not escalate attemt to add self to a group to the user, just return false from add_contact_to_chat() 2019-10-30 14:03:54 +01:00
B. Petersen 6fea6f730d fix recognition of mailto-address-qr-codes, add tests 2019-10-30 13:13:02 +01:00
B. Petersen 39cd8465f4 allow plus-space-encoding in qr-code, adapt tests 2019-10-30 00:37:35 +01:00
holger krekel 911c0e45dc expose empty server functionality and test it (also introducing a new DC_EVENT_IMAP_FOLDER_EMPTIED event) 2019-10-29 22:19:13 +01:00
holger krekel 7628ee1e05 rust-part of empty_server 2019-10-29 22:19:13 +01:00
holger krekel de3e5e1c39 fix deadlock issue with config access 2019-10-29 16:08:24 +01:00
B. Petersen 27627b4f74 show better error message for a simple 'bad credentials' error and give some more hints for other errors 2019-10-29 16:08:24 +01:00
B. Petersen 469f8ac31d make stock_string_repl_str2() public as the other members 2019-10-29 16:08:24 +01:00
Floris Bruynooghe c8d296ea0e A MsgId newtype
This more strongly types the ubiquitous message id type by no longer
making it an integer.  It keeps the actual ID opaque.  Only for the
generic job API the number keeps being used.  Some locations also need
to create it from an integer and call MsgId::new().
2019-10-29 15:30:53 +01:00
holger krekel b4464ab0a3 address @dignifiedquire comments 2019-10-28 20:51:17 +01:00
holger krekel 1cc4f56025 make imap-idle survive disconnects (during and at the beginning of an app) 2019-10-28 20:51:17 +01:00
holger krekel 1d03e0822e seems to work 2019-10-28 20:51:17 +01:00
B. Petersen da28e1dd44 address comment of @flub and add some tests 2019-10-27 13:32:06 +01:00
B. Petersen d223a286c0 in summary, show hyphen only if there is a type and a text; this avoids summaries as 'Voice message -' 2019-10-27 13:31:52 +01:00
Alexander Krotov 7916a7fa07 Fix spelling of Param::GuaranteeE2ee 2019-10-27 11:51:59 +01:00
Alexander Krotov ee81895e1e Use DC_CONTACT_ID_SELF in do_initiate_key_transfer 2019-10-27 11:51:47 +01:00
Alexander Krotov 6ac4384769 location.rs cleanup
Use constants where possible, move "let" closer to assignments.
2019-10-27 11:51:35 +01:00
Alexander Krotov 99fababf0b to_base64: operate on characters instead of bytes to avoid unsafe code 2019-10-27 11:51:25 +01:00
Alexander Krotov cfa69cf35a Add Params::set_cmd and use SystemMessage constants 2019-10-26 14:04:08 +02:00
B. Petersen dced1932b3 if show_emails=ALL, show belonging contact-requests directly in the chatlist 2019-10-24 11:12:35 +02:00
B. Petersen 79a08f96c5 make ShowEmails an enum, use constant for trash 2019-10-24 11:12:35 +02:00
B. Petersen df4273e986 fix logic error: adding a member to a group is okay if a real contact exists or for SELF 2019-10-23 14:03:42 +02:00
Floris Bruynooghe 5d79690260 Add Params::get_file(), ::get_path() and ::get_blob()
Turns out that anyone that uses these either justs wants a file or
wants a blob.  Consolidate those patterns into one place and simplify
all the callers.
2019-10-22 18:54:09 +02:00
Floris Bruynooghe 6c9e16d31a Introduce a BlobObject type for blobs
This creates a specific type for blobs, with well defined conversions
at the borders.  It also introduces a strong type for the Param::File
value since that param is often used used by the public API to set
filenames using absolute paths, but then core changes the param to a
blob before it gets to the database.

This eliminates a few more functions with very mallable C-like
arguments behaviour which combine a number of operations in one.
Because blob filenames are stored so often in arbitrary strings this
does add more code when receiving those, until the storage is fixed.

File name sanitisation is now deletated to the sanitize-filename crate
which should do a slightly better job at this.
2019-10-22 18:54:09 +02:00
Alexander Krotov bed14d5c02 Initialize continue_streaming with false
Otherwise this variable is constant.
2019-10-22 13:24:23 +03:00
Alexander Krotov d3c831a0a2 Replace continue_streaming int with bool 2019-10-22 13:24:23 +03:00
Alexander Krotov 0007c12dea Replace FORCE_SCHEDULE #define from C core with bool 2019-10-22 13:24:23 +03:00
B. Petersen 049077f13b reconnect on io errors and broken pipes 2019-10-22 09:58:05 +02:00
holger krekel e17c69f89c actually try connecting, instead of just preparing the connect 2019-10-21 23:17:18 +02:00
dignifiedquire 4a2e1897a6 fix(smtp): use correct auth mechanisms 2019-10-20 13:10:17 +02:00
dignifiedquire 076616bfb9 fix(imap): read server greeting 2019-10-20 13:10:17 +02:00
Dmitry Bogatov a9dd78f622 Narrow return type of location::set: cint -> bool 2019-10-19 22:38:43 +02:00