Alexander Krotov
508b8ef2e2
Improve documentation, mostly by hiding behind pub(crate)
2020-02-20 23:37:13 +03:00
holger krekel
e94c62e5b3
Update src/contact.rs
...
fix typo
2020-02-20 02:10:56 +01:00
B. Petersen
b65a6c2829
target comment of @hpk42
2020-02-20 02:10:56 +01:00
B. Petersen
c4a20d0798
fix updating names from incoming mails
...
- if a manual name was never given, always update names from incoming mails
- if a manual name is cleared, fall back to names from incoming mails
2020-02-20 02:10:56 +01:00
B. Petersen
9cb7ea524e
add failing test where a contact-name is not updated as expected
2020-02-20 02:10:56 +01:00
Alexander Krotov
6b6be3b03d
Fix some "`" code markup
2020-02-18 05:06:11 +03:00
Alexander Krotov
e00d4e0ed8
Remove AvatarAction::None
...
Where needed, Option<AvatarAction> can be used to extend it.
2020-02-16 15:03:37 +03: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
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
Alexander Krotov
a31c6d82c9
Remove get_origin_by_id
2019-12-28 22:33:57 +00: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
holger krekel
8b57ce1792
remove unused include_in_contactlist
2019-12-19 16:53:55 +01:00
holger krekel
6c14e429eb
Origin::is_verified() -> Origin::is_known() because this has nothing to do with verified groups or contacts
2019-12-19 16:53:55 +01:00
holger krekel
c3d909c818
add a test that contacts are properly created and fix ordering in dc_receive_imf to pass the test
2019-12-19 16:53:55 +01:00
Alexander Krotov
73c21ae0a9
refactor: enable clippy::unreadable_literal
2019-12-18 23:23:38 +03:00
holger krekel
4bacae3711
fix #1037 and simplify mdn-report related code and state
2019-12-15 22:18:34 +03:00
Alexander Krotov
b3ee89c6e5
Documentation improvements
2019-12-15 16:15:09 +03:00
Simon Laux
7b55863418
switch priority order
2019-12-13 11:58:21 +01:00
Simon Laux
38d5fad4e5
fix displayname to use authname when availible
2019-12-13 11:58:08 +01:00
B. Petersen
f6861ca5f5
target comments from @flub and @dignifiedquire
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
c3fd0889e2
use tri-state ImageAction instead of Option<Option>
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
36edf447e7
load param incl. user-profile-image from db
2019-12-13 01:17:48 +01:00
holger krekel
5f916f5a9c
- create and use a ContactIds type as an ordered set instead of "Vec<u32>".
...
- recreate the group list more carefully, fixes #985
- resultify a few functions in the dc_receive pipeline
- don't quote displaynames in email-addresses, use utf8, preliminrarily addresses #976
2019-12-09 16:29:24 +01:00
Alexander Krotov
a99b96e36e
Use bool for from_id_blocked flag
2019-12-09 09:54:46 +01: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
Alexander Krotov
612600278a
Move SQL errors into their own module
2019-12-01 21:01:03 +01:00
Alexander Krotov
d5359fb9ba
Ensure that Peerstate has an address set on the type level
2019-12-01 01:52:54 +01:00
B. Petersen
4e6d0c9c69
fix places where string-cmp was used instead of addr_cmp() for email-address-comparison
2019-11-30 01:49:45 +01:00
B. Petersen
81d069209c
add some tests for addr_cmp()
2019-11-30 01:49:45 +01:00
B. Petersen
63e3c82f9d
compare email-addresses case-insesitive, use this comparison also to check for SELF
2019-11-30 01:49:45 +01:00
Alexander Krotov
59700cb477
Restore peerstate constants from C core
2019-11-27 05:41:54 +01:00
Alexander Krotov
69e14dcb2d
Replace some magic numbers with constants
2019-11-16 16:08:08 +00:00
B. Petersen
852b16c972
target comment of @flub
2019-11-16 13:55:59 +01:00
B. Petersen
5796c28391
test contact adding and modifying
2019-11-16 13:55:59 +01:00
Alexander Krotov
f778957caf
Improve documentation and comments
2019-11-16 13:53:47 +01:00
B. Petersen
f8afefa2c1
get contact- and chat-info for device-messages
2019-11-06 13:33:30 +01:00
B. Petersen
8c2efa707a
name special contact-ids where easily possible
...
the point of this pr is to get an overview
how and where DC_CONTACT_ID_DEVICE is used,
to prepare introducing a device-"chat".
i did not change the sql statements for now
as this would require some more refactoring
and has the potential to introduce bugs.
2019-11-04 13:20:35 +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
Alexander Krotov
130d485cac
Fix some clippy warnings
2019-10-03 14:30:40 +02:00
B. Petersen
6888554e9d
use independent verification key
...
there are 3 key blobs in the database, gossip_key, public_key and verified_key.
the verification_key should not change if, for any reasons,
the public_key or the gossip_key changes.
2019-09-28 00:55:36 +02:00
dignifiedquire
5486ac5b9f
refacor: use an enum for events
2019-09-15 23:40:08 +02:00
dignifiedquire
f31f341a50
feat: enforce Debug implementations and remove mod types
2019-09-15 16:36:31 +02:00
Dmitry Bogatov
bb4081e503
Rename query_row_col to query_get_value
...
Since function `query_row_col` no longer accept column number argument,
it is misleading to mention column in its name.
2019-09-12 18:42:12 +00:00
Dmitry Bogatov
cdfc7281d0
Simplify Sql.query_row_col function
...
Function `query_row` executes query and calls callback function to process
row returned. Function query_row_col() is special case, that provides
callback function, which returns value of one particular column of row,
ignoring others.
In all cases, that particular column was 0 (first and only column of
query result), since there is no point to select more than one column
with this function -- they are discarded anyway.
This commit removes that redundancy, removing column number argument of
query_row_col() function and adjusting call sites accordingly.
2019-09-12 05:01:06 +00:00
Floris Bruynooghe
aefddf7f5e
Remove context refrence from Contact struct
...
This will allow the Rust Context API to be refactored without breaking
the C API. Full details in #476 aka
a0b5e32f98
2019-09-11 23:53:48 +02:00