-
-
Notifications
You must be signed in to change notification settings - Fork 100
PGP contacts #6796
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
PGP contacts #6796
Changes from all commits
2eb03c4
78eba1d
5c0562a
9bf093a
c77f523
fce62d2
ae3ae96
98da6ac
4b38776
3281335
9beb7f5
6474acc
24826ee
2ed83f0
1ed4487
e481198
438bf3c
939d265
6714844
bd9f000
82493df
f00f77e
6a239f6
10ebfe0
c2eedd0
9d24d63
465e7ad
a111fdc
bf16341
9a575e8
b6df044
cede2d2
f4020c8
2147c1f
48547e5
92f1457
8fc0daa
62c60df
aed67e1
4cdce20
6634dd8
29e7bdf
0f3d605
8bedaca
a35bf8d
23c90df
d37274d
5f0dee0
570b767
e4648e9
5b12fd3
15256c9
dec8cf9
e931a05
96e821f
f308ed2
7923748
b777f28
c06e1f2
387f968
7876f09
7e04f61
de03339
a692d6d
0f67efd
23796c0
a997484
914fd42
ba8eccd
5ba0e52
9150631
e932872
990c189
81bf41f
fde8d0c
30357de
a09ae9c
1acedaa
51e3c47
e4e8bcf
18f7b1a
1028fa2
7bfe247
d46bda1
ec91fc0
9a79edc
d71d9a9
2e5664c
b839ba4
29e0e3c
4f4e22f
d50795a
3a1ddba
64538fa
16e3bf1
e345f97
8fceae4
7e8a003
c169712
e94b635
dae62b1
42e7d17
544f23c
f160d68
6e2f30e
0d47538
72881b2
d76237d
ca3d132
4e5efc8
aefb1c8
d93556b
952c259
b8de6af
640035f
c8fb0c9
3b22df4
24e798a
0505cba
8fd4499
ab94b88
303c6f6
443f75e
806f067
9891ca7
b82c054
cf8a30c
4050d8d
078fde0
8c6d12b
6cb4d43
eef17f9
501010a
3e8e540
463f524
2f55190
1205d09
46752cd
56a1dba
25d9520
8946ef3
2b9b6aa
088746c
514c116
af11af9
c43645a
2e9531d
c9493e7
f7e609d
cf0ae7b
f89e2c0
af4e3fe
2db72ae
b7a1538
b0d52c2
7f29744
1e89784
a28670e
207d601
ba65f29
c2a2035
72614b0
224f4d0
4dc0674
ee53a54
0c35aa3
3acfbe6
fd1eb7d
546e0ea
6a5df61
0d3e6f0
02bdff1
7afcd7d
48e840d
200248f
fb78402
dfe9d7e
1073b0b
b8fe657
75ce32a
eda5f56
15ba0a1
91ae9d8
cc8bc70
d5b70ca
2cd6d3f
2dd96f8
9cb5e09
e9f198d
c3db92b
7dc1754
aef2029
324204b
44f0045
62ccdb7
e679932
da60ab6
9a7078e
99a2185
85edc8d
792cf23
98fcd09
e70b5ce
e3f2946
66a3dfc
279640b
9ba0ad0
205c8a2
6f60473
588b85b
329c36e
950f9a3
d49e8ba
6fb0596
081204c
9bf73ad
d5d1d39
d27e850
e717183
fba5ca3
552d86d
e6a79fb
b31b935
3d1d1e4
5d456f0
65bd25b
6525a24
e0b84b7
b3adddc
827e39c
430cfe3
881f8ff
b3ead8c
be41b24
839630f
7ddbc19
780afc4
d72fcb9
6deff15
eef4c63
f449f08
0455463
10020f7
4688b0b
5bbe565
ba267d4
239174f
fd225ca
67add91
6d764a4
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
BEGIN:VCARD | ||
VERSION:4.0 | ||
EMAIL:[email protected] | ||
FN:Statistics bot | ||
KEY:data:application/pgp-keys;base64,xjMEZbfBlBYJKwYBBAHaRw8BAQdABpLWS2PUIGGo4pslVt4R8sylP5wZihmhf1DTDr3oCMPNHDxzZWxmX3JlcG9ydGluZ0B0ZXN0cnVuLm9yZz7CiwQQFggAMwIZAQUCZbfBlAIbAwQLCQgHBhUICQoLAgMWAgEWIQTS2i16sHeYTckGn284K3M5Z4oohAAKCRA4K3M5Z4oohD8dAQCQV7CoH6UP4PD+NqI4kW5tbbqdh2AnDROg60qotmLExAEAxDfd3QHAK9f8b9qQUbLmHIztCLxhEuVbWPBEYeVW0gvOOARlt8GUEgorBgEEAZdVAQUBAQdAMBUhYoAAcI625vGZqnM5maPX4sGJ7qvJxPAFILPy6AcDAQgHwngEGBYIACAFAmW3wZQCGwwWIQTS2i16sHeYTckGn284K3M5Z4oohAAKCRA4K3M5Z4oohPwCAQCvzk1ObIkj2GqsuIfaULlgdnfdZY8LNary425CEfHZDQD5AblXVrlMO1frdlc/Vo9z3pEeCrfYdD7ITD3/OeVoiQ4= | ||
REV:20250412T195751Z | ||
END:VCARD |
Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -30,6 +30,7 @@ pub struct FullChat { | |||||||||||||||||||||||||||||||||||||||||||||||||
/// in the contact profile | ||||||||||||||||||||||||||||||||||||||||||||||||||
/// if 1:1 chat with this contact exists and is protected. | ||||||||||||||||||||||||||||||||||||||||||||||||||
is_protected: bool, | ||||||||||||||||||||||||||||||||||||||||||||||||||
is_encrypted: bool, | ||||||||||||||||||||||||||||||||||||||||||||||||||
link2xt marked this conversation as resolved.
Show resolved
Hide resolved
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||||||||||||||||||||||||||||||||||||
profile_image: Option<String>, //BLOBS ? | ||||||||||||||||||||||||||||||||||||||||||||||||||
archived: bool, | ||||||||||||||||||||||||||||||||||||||||||||||||||
pinned: bool, | ||||||||||||||||||||||||||||||||||||||||||||||||||
|
@@ -108,6 +109,7 @@ impl FullChat { | |||||||||||||||||||||||||||||||||||||||||||||||||
id: chat_id, | ||||||||||||||||||||||||||||||||||||||||||||||||||
name: chat.name.clone(), | ||||||||||||||||||||||||||||||||||||||||||||||||||
is_protected: chat.is_protected(), | ||||||||||||||||||||||||||||||||||||||||||||||||||
is_encrypted: chat.is_encrypted(context).await?, | ||||||||||||||||||||||||||||||||||||||||||||||||||
profile_image, //BLOBS ? | ||||||||||||||||||||||||||||||||||||||||||||||||||
archived: chat.get_visibility() == chat::ChatVisibility::Archived, | ||||||||||||||||||||||||||||||||||||||||||||||||||
pinned: chat.get_visibility() == chat::ChatVisibility::Pinned, | ||||||||||||||||||||||||||||||||||||||||||||||||||
|
@@ -159,6 +161,8 @@ pub struct BasicChat { | |||||||||||||||||||||||||||||||||||||||||||||||||
/// in the contact profile | ||||||||||||||||||||||||||||||||||||||||||||||||||
/// if 1:1 chat with this contact exists and is protected. | ||||||||||||||||||||||||||||||||||||||||||||||||||
is_protected: bool, | ||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||
is_encrypted: bool, | ||||||||||||||||||||||||||||||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not sure what to do about the documentation here; just duplicate it?
Suggested change
|
||||||||||||||||||||||||||||||||||||||||||||||||||
profile_image: Option<String>, //BLOBS ? | ||||||||||||||||||||||||||||||||||||||||||||||||||
archived: bool, | ||||||||||||||||||||||||||||||||||||||||||||||||||
pinned: bool, | ||||||||||||||||||||||||||||||||||||||||||||||||||
|
@@ -187,6 +191,7 @@ impl BasicChat { | |||||||||||||||||||||||||||||||||||||||||||||||||
id: chat_id, | ||||||||||||||||||||||||||||||||||||||||||||||||||
name: chat.name.clone(), | ||||||||||||||||||||||||||||||||||||||||||||||||||
is_protected: chat.is_protected(), | ||||||||||||||||||||||||||||||||||||||||||||||||||
is_encrypted: chat.is_encrypted(context).await?, | ||||||||||||||||||||||||||||||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This adds up to 2 additional database calls to loading There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. One idea might be to have a separate chattype, SingleUnencrypted. |
||||||||||||||||||||||||||||||||||||||||||||||||||
profile_image, //BLOBS ? | ||||||||||||||||||||||||||||||||||||||||||||||||||
archived: chat.get_visibility() == chat::ChatVisibility::Archived, | ||||||||||||||||||||||||||||||||||||||||||||||||||
pinned: chat.get_visibility() == chat::ChatVisibility::Pinned, | ||||||||||||||||||||||||||||||||||||||||||||||||||
|
Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -30,6 +30,12 @@ pub enum ChatListItemFetchResult { | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
/// showing preview if last chat message is image | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
summary_preview_image: Option<String>, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
is_protected: bool, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
/// True if the chat is encrypted. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
/// | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
/// False e.g. for 1:1 chats with email-contacts | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
/// and ad hoc groups. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
is_encrypted: bool, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Comment on lines
+34
to
+38
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not sure what to do about the documentation here; just duplicate it?
Suggested change
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
is_group: bool, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
fresh_message_counter: usize, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
is_self_talk: bool, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
@@ -137,6 +143,7 @@ pub(crate) async fn get_chat_list_item_by_id( | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
summary_status: summary.state.to_u32().expect("impossible"), // idea and a function to transform the constant to strings? or return string enum | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
summary_preview_image, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
is_protected: chat.is_protected(), | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
is_encrypted: chat.is_encrypted(ctx).await?, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
is_group: chat.get_type() == Chattype::Group, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
fresh_message_counter, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
is_self_talk: chat.is_self_talk(), | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -19,6 +19,16 @@ pub struct ContactObject { | |||||||||||||||||||||||||||
profile_image: Option<String>, // BLOBS | ||||||||||||||||||||||||||||
name_and_addr: String, | ||||||||||||||||||||||||||||
is_blocked: bool, | ||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||
/// Is the contact a PGP contact. | ||||||||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||||||||||||||
is_pgp_contact: bool, | ||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||
/// Is encryption available for this contact. | ||||||||||||||||||||||||||||
/// | ||||||||||||||||||||||||||||
/// This can only be true for PGP-contacts. | ||||||||||||||||||||||||||||
/// However, it is possible to have a PGP-contact | ||||||||||||||||||||||||||||
/// for which encryption is not available because we don't have a key yet, | ||||||||||||||||||||||||||||
/// e.g. if we just scanned the fingerprint from a QR code. | ||||||||||||||||||||||||||||
e2ee_avail: bool, | ||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||
/// True if the contact can be added to verified groups. | ||||||||||||||||||||||||||||
|
@@ -67,6 +77,7 @@ impl ContactObject { | |||||||||||||||||||||||||||
let verifier_id = contact | ||||||||||||||||||||||||||||
.get_verifier_id(context) | ||||||||||||||||||||||||||||
.await? | ||||||||||||||||||||||||||||
.flatten() | ||||||||||||||||||||||||||||
.map(|contact_id| contact_id.to_u32()); | ||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||
Ok(ContactObject { | ||||||||||||||||||||||||||||
|
@@ -80,6 +91,7 @@ impl ContactObject { | |||||||||||||||||||||||||||
profile_image, //BLOBS | ||||||||||||||||||||||||||||
name_and_addr: contact.get_name_n_addr(), | ||||||||||||||||||||||||||||
is_blocked: contact.is_blocked(), | ||||||||||||||||||||||||||||
is_pgp_contact: contact.is_pgp_contact(), | ||||||||||||||||||||||||||||
e2ee_avail: contact.e2ee_avail(context).await?, | ||||||||||||||||||||||||||||
is_verified, | ||||||||||||||||||||||||||||
is_profile_verified, | ||||||||||||||||||||||||||||
|
Uh oh!
There was an error while loading. Please reload this page.