deltachat-rpc-client 2.21.0__tar.gz → 2.23.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of deltachat-rpc-client might be problematic. Click here for more details.
- {deltachat_rpc_client-2.21.0/src/deltachat_rpc_client.egg-info → deltachat_rpc_client-2.23.0}/PKG-INFO +1 -1
- {deltachat_rpc_client-2.21.0 → deltachat_rpc_client-2.23.0}/pyproject.toml +1 -1
- {deltachat_rpc_client-2.21.0 → deltachat_rpc_client-2.23.0}/src/deltachat_rpc_client/account.py +7 -6
- {deltachat_rpc_client-2.21.0 → deltachat_rpc_client-2.23.0}/src/deltachat_rpc_client/client.py +2 -3
- {deltachat_rpc_client-2.21.0 → deltachat_rpc_client-2.23.0}/src/deltachat_rpc_client/pytestplugin.py +6 -7
- {deltachat_rpc_client-2.21.0 → deltachat_rpc_client-2.23.0/src/deltachat_rpc_client.egg-info}/PKG-INFO +1 -1
- {deltachat_rpc_client-2.21.0 → deltachat_rpc_client-2.23.0}/tests/test_calls.py +23 -0
- {deltachat_rpc_client-2.21.0 → deltachat_rpc_client-2.23.0}/tests/test_chatlist_events.py +2 -0
- {deltachat_rpc_client-2.21.0 → deltachat_rpc_client-2.23.0}/tests/test_iroh_webxdc.py +3 -1
- {deltachat_rpc_client-2.21.0 → deltachat_rpc_client-2.23.0}/tests/test_key_transfer.py +2 -6
- {deltachat_rpc_client-2.21.0 → deltachat_rpc_client-2.23.0}/tests/test_securejoin.py +28 -34
- {deltachat_rpc_client-2.21.0 → deltachat_rpc_client-2.23.0}/tests/test_something.py +9 -3
- deltachat_rpc_client-2.23.0/tests/test_vcard.py +27 -0
- deltachat_rpc_client-2.21.0/tests/test_vcard.py +0 -14
- {deltachat_rpc_client-2.21.0 → deltachat_rpc_client-2.23.0}/LICENSE +0 -0
- {deltachat_rpc_client-2.21.0 → deltachat_rpc_client-2.23.0}/README.md +0 -0
- {deltachat_rpc_client-2.21.0 → deltachat_rpc_client-2.23.0}/setup.cfg +0 -0
- {deltachat_rpc_client-2.21.0 → deltachat_rpc_client-2.23.0}/src/deltachat_rpc_client/__init__.py +0 -0
- {deltachat_rpc_client-2.21.0 → deltachat_rpc_client-2.23.0}/src/deltachat_rpc_client/_utils.py +0 -0
- {deltachat_rpc_client-2.21.0 → deltachat_rpc_client-2.23.0}/src/deltachat_rpc_client/chat.py +0 -0
- {deltachat_rpc_client-2.21.0 → deltachat_rpc_client-2.23.0}/src/deltachat_rpc_client/const.py +0 -0
- {deltachat_rpc_client-2.21.0 → deltachat_rpc_client-2.23.0}/src/deltachat_rpc_client/contact.py +0 -0
- {deltachat_rpc_client-2.21.0 → deltachat_rpc_client-2.23.0}/src/deltachat_rpc_client/deltachat.py +0 -0
- {deltachat_rpc_client-2.21.0 → deltachat_rpc_client-2.23.0}/src/deltachat_rpc_client/events.py +0 -0
- {deltachat_rpc_client-2.21.0 → deltachat_rpc_client-2.23.0}/src/deltachat_rpc_client/message.py +0 -0
- {deltachat_rpc_client-2.21.0 → deltachat_rpc_client-2.23.0}/src/deltachat_rpc_client/py.typed +0 -0
- {deltachat_rpc_client-2.21.0 → deltachat_rpc_client-2.23.0}/src/deltachat_rpc_client/rpc.py +0 -0
- {deltachat_rpc_client-2.21.0 → deltachat_rpc_client-2.23.0}/src/deltachat_rpc_client.egg-info/SOURCES.txt +0 -0
- {deltachat_rpc_client-2.21.0 → deltachat_rpc_client-2.23.0}/src/deltachat_rpc_client.egg-info/dependency_links.txt +0 -0
- {deltachat_rpc_client-2.21.0 → deltachat_rpc_client-2.23.0}/src/deltachat_rpc_client.egg-info/entry_points.txt +0 -0
- {deltachat_rpc_client-2.21.0 → deltachat_rpc_client-2.23.0}/src/deltachat_rpc_client.egg-info/top_level.txt +0 -0
- {deltachat_rpc_client-2.21.0 → deltachat_rpc_client-2.23.0}/tests/test_account_events.py +0 -0
- {deltachat_rpc_client-2.21.0 → deltachat_rpc_client-2.23.0}/tests/test_multidevice.py +0 -0
- {deltachat_rpc_client-2.21.0 → deltachat_rpc_client-2.23.0}/tests/test_webxdc.py +0 -0
{deltachat_rpc_client-2.21.0 → deltachat_rpc_client-2.23.0}/src/deltachat_rpc_client/account.py
RENAMED
|
@@ -125,6 +125,11 @@ class Account:
|
|
|
125
125
|
"""Add a new transport."""
|
|
126
126
|
yield self._rpc.add_or_update_transport.future(self.id, params)
|
|
127
127
|
|
|
128
|
+
@futuremethod
|
|
129
|
+
def add_transport_from_qr(self, qr: str):
|
|
130
|
+
"""Add a new transport using a QR code."""
|
|
131
|
+
yield self._rpc.add_transport_from_qr.future(self.id, qr)
|
|
132
|
+
|
|
128
133
|
@futuremethod
|
|
129
134
|
def list_transports(self):
|
|
130
135
|
"""Return the list of all email accounts that are used as a transport in the current profile."""
|
|
@@ -300,7 +305,7 @@ class Account:
|
|
|
300
305
|
chats.append(AttrDict(item))
|
|
301
306
|
return chats
|
|
302
307
|
|
|
303
|
-
def create_group(self, name: str
|
|
308
|
+
def create_group(self, name: str) -> Chat:
|
|
304
309
|
"""Create a new group chat.
|
|
305
310
|
|
|
306
311
|
After creation,
|
|
@@ -317,12 +322,8 @@ class Account:
|
|
|
317
322
|
To check, if a chat is still unpromoted, you can look at the `is_unpromoted` property of a chat
|
|
318
323
|
(see `get_full_snapshot()` / `get_basic_snapshot()`).
|
|
319
324
|
This may be useful if you want to show some help for just created groups.
|
|
320
|
-
|
|
321
|
-
:param protect: If set to 1 the function creates group with protection initially enabled.
|
|
322
|
-
Only verified members are allowed in these groups
|
|
323
|
-
and end-to-end-encryption is always enabled.
|
|
324
325
|
"""
|
|
325
|
-
return Chat(self, self._rpc.create_group_chat(self.id, name,
|
|
326
|
+
return Chat(self, self._rpc.create_group_chat(self.id, name, False))
|
|
326
327
|
|
|
327
328
|
def create_broadcast(self, name: str) -> Chat:
|
|
328
329
|
"""Create a new **broadcast channel**
|
{deltachat_rpc_client-2.21.0 → deltachat_rpc_client-2.23.0}/src/deltachat_rpc_client/client.py
RENAMED
|
@@ -83,11 +83,10 @@ class Client:
|
|
|
83
83
|
|
|
84
84
|
def configure(self, email: str, password: str, **kwargs) -> None:
|
|
85
85
|
"""Configure the client."""
|
|
86
|
-
self.account.set_config("addr", email)
|
|
87
|
-
self.account.set_config("mail_pw", password)
|
|
88
86
|
for key, value in kwargs.items():
|
|
89
87
|
self.account.set_config(key, value)
|
|
90
|
-
|
|
88
|
+
params = {"addr": email, "password": password}
|
|
89
|
+
self.account.add_or_update_transport(params)
|
|
91
90
|
self.logger.debug("Account configured")
|
|
92
91
|
|
|
93
92
|
def run_forever(self) -> None:
|
{deltachat_rpc_client-2.21.0 → deltachat_rpc_client-2.23.0}/src/deltachat_rpc_client/pytestplugin.py
RENAMED
|
@@ -43,10 +43,9 @@ class ACFactory:
|
|
|
43
43
|
@futuremethod
|
|
44
44
|
def new_configured_account(self):
|
|
45
45
|
"""Create a new configured account."""
|
|
46
|
-
addr, password = self.get_credentials()
|
|
47
46
|
account = self.get_unconfigured_account()
|
|
48
|
-
|
|
49
|
-
yield account.
|
|
47
|
+
domain = os.getenv("CHATMAIL_DOMAIN")
|
|
48
|
+
yield account.add_transport_from_qr.future(f"dcaccount:{domain}")
|
|
50
49
|
|
|
51
50
|
assert account.is_configured()
|
|
52
51
|
return account
|
|
@@ -73,11 +72,11 @@ class ACFactory:
|
|
|
73
72
|
def resetup_account(self, ac: Account) -> Account:
|
|
74
73
|
"""Resetup account from scratch, losing the encryption key."""
|
|
75
74
|
ac.stop_io()
|
|
76
|
-
|
|
77
|
-
for i in ["addr", "mail_pw"]:
|
|
78
|
-
ac_clone.set_config(i, ac.get_config(i))
|
|
75
|
+
transports = ac.list_transports()
|
|
79
76
|
ac.remove()
|
|
80
|
-
ac_clone.
|
|
77
|
+
ac_clone = self.get_unconfigured_account()
|
|
78
|
+
for transport in transports:
|
|
79
|
+
ac_clone.add_or_update_transport(transport)
|
|
81
80
|
return ac_clone
|
|
82
81
|
|
|
83
82
|
def get_accepted_chat(self, ac1: Account, ac2: Account) -> Chat:
|
|
@@ -9,6 +9,7 @@ def test_calls(acfactory) -> None:
|
|
|
9
9
|
|
|
10
10
|
alice_contact_bob = alice.create_contact(bob, "Bob")
|
|
11
11
|
alice_chat_bob = alice_contact_bob.create_chat()
|
|
12
|
+
bob.create_chat(alice) # Accept the chat so incoming call causes a notification.
|
|
12
13
|
outgoing_call_message = alice_chat_bob.place_outgoing_call(place_call_info)
|
|
13
14
|
assert outgoing_call_message.get_call_info().state.kind == "Alerting"
|
|
14
15
|
|
|
@@ -67,6 +68,7 @@ a=extmap:1 urn:ietf:params:rtp-hdrext:sdes:mid\r
|
|
|
67
68
|
|
|
68
69
|
alice, bob = acfactory.get_online_accounts(2)
|
|
69
70
|
|
|
71
|
+
bob.create_chat(alice) # Accept the chat so incoming call causes a notification.
|
|
70
72
|
alice_contact_bob = alice.create_contact(bob, "Bob")
|
|
71
73
|
alice_chat_bob = alice_contact_bob.create_chat()
|
|
72
74
|
alice_chat_bob.place_outgoing_call(place_call_info)
|
|
@@ -84,3 +86,24 @@ def test_ice_servers(acfactory) -> None:
|
|
|
84
86
|
|
|
85
87
|
ice_servers = alice.ice_servers()
|
|
86
88
|
assert len(ice_servers) == 1
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
def test_no_contact_request_call(acfactory) -> None:
|
|
92
|
+
alice, bob = acfactory.get_online_accounts(2)
|
|
93
|
+
|
|
94
|
+
alice_chat_bob = alice.create_chat(bob)
|
|
95
|
+
alice_chat_bob.place_outgoing_call("offer")
|
|
96
|
+
alice_chat_bob.send_text("Hello!")
|
|
97
|
+
|
|
98
|
+
# Notification for "Hello!" message should arrive
|
|
99
|
+
# without the call ringing.
|
|
100
|
+
while True:
|
|
101
|
+
event = bob.wait_for_event()
|
|
102
|
+
|
|
103
|
+
# There should be no incoming call notification.
|
|
104
|
+
assert event.kind != EventType.INCOMING_CALL
|
|
105
|
+
|
|
106
|
+
if event.kind == EventType.MSGS_CHANGED:
|
|
107
|
+
msg = bob.get_message_by_id(event.msg_id)
|
|
108
|
+
if msg.get_snapshot().text == "Hello!":
|
|
109
|
+
break
|
|
@@ -169,6 +169,8 @@ def test_imap_sync_seen_msgs(acfactory: ACFactory) -> None:
|
|
|
169
169
|
"""
|
|
170
170
|
alice, alice_second_device, bob, alice_chat_bob = get_multi_account_test_setup(acfactory)
|
|
171
171
|
|
|
172
|
+
bob.create_chat(alice)
|
|
173
|
+
|
|
172
174
|
alice_chat_bob.send_text("hello")
|
|
173
175
|
|
|
174
176
|
msg = bob.wait_for_incoming_msg()
|
|
@@ -214,7 +214,9 @@ def test_advertisement_after_chatting(acfactory, path_to_webxdc):
|
|
|
214
214
|
ac1_ac2_chat = ac1.create_chat(ac2)
|
|
215
215
|
ac1_webxdc_msg = ac1_ac2_chat.send_message(text="WebXDC", file=path_to_webxdc)
|
|
216
216
|
ac2_webxdc_msg = ac2.wait_for_incoming_msg()
|
|
217
|
-
|
|
217
|
+
ac2_webxdc_msg_snapshot = ac2_webxdc_msg.get_snapshot()
|
|
218
|
+
assert ac2_webxdc_msg_snapshot.text == "WebXDC"
|
|
219
|
+
ac2_webxdc_msg_snapshot.chat.accept()
|
|
218
220
|
|
|
219
221
|
ac1_ac2_chat.send_text("Hello!")
|
|
220
222
|
ac2_hello_msg = ac2.wait_for_incoming_msg()
|
|
@@ -18,9 +18,7 @@ def test_autocrypt_setup_message_key_transfer(acfactory):
|
|
|
18
18
|
alice1 = acfactory.get_online_account()
|
|
19
19
|
|
|
20
20
|
alice2 = acfactory.get_unconfigured_account()
|
|
21
|
-
alice2.
|
|
22
|
-
alice2.set_config("mail_pw", alice1.get_config("mail_pw"))
|
|
23
|
-
alice2.configure()
|
|
21
|
+
alice2.add_or_update_transport({"addr": alice1.get_config("addr"), "password": alice1.get_config("mail_pw")})
|
|
24
22
|
alice2.bring_online()
|
|
25
23
|
|
|
26
24
|
setup_code = alice1.initiate_autocrypt_key_transfer()
|
|
@@ -37,9 +35,7 @@ def test_ac_setup_message_twice(acfactory):
|
|
|
37
35
|
alice1 = acfactory.get_online_account()
|
|
38
36
|
|
|
39
37
|
alice2 = acfactory.get_unconfigured_account()
|
|
40
|
-
alice2.
|
|
41
|
-
alice2.set_config("mail_pw", alice1.get_config("mail_pw"))
|
|
42
|
-
alice2.configure()
|
|
38
|
+
alice2.add_or_update_transport({"addr": alice1.get_config("addr"), "password": alice1.get_config("mail_pw")})
|
|
43
39
|
alice2.bring_online()
|
|
44
40
|
|
|
45
41
|
# Send the first Autocrypt Setup Message and ignore it.
|
|
@@ -58,8 +58,7 @@ def test_qr_setup_contact_svg(acfactory) -> None:
|
|
|
58
58
|
assert "Alice" in svg
|
|
59
59
|
|
|
60
60
|
|
|
61
|
-
|
|
62
|
-
def test_qr_securejoin(acfactory, protect):
|
|
61
|
+
def test_qr_securejoin(acfactory):
|
|
63
62
|
alice, bob, fiona = acfactory.get_online_accounts(3)
|
|
64
63
|
|
|
65
64
|
# Setup second device for Alice
|
|
@@ -67,8 +66,7 @@ def test_qr_securejoin(acfactory, protect):
|
|
|
67
66
|
alice2 = alice.clone()
|
|
68
67
|
|
|
69
68
|
logging.info("Alice creates a group")
|
|
70
|
-
alice_chat = alice.create_group("Group"
|
|
71
|
-
assert alice_chat.get_basic_snapshot().is_protected == protect
|
|
69
|
+
alice_chat = alice.create_group("Group")
|
|
72
70
|
|
|
73
71
|
logging.info("Bob joins the group")
|
|
74
72
|
qr_code = alice_chat.get_qr_code()
|
|
@@ -89,7 +87,6 @@ def test_qr_securejoin(acfactory, protect):
|
|
|
89
87
|
|
|
90
88
|
snapshot = bob.get_message_by_id(bob.wait_for_incoming_msg_event().msg_id).get_snapshot()
|
|
91
89
|
assert snapshot.text == "Member Me added by {}.".format(alice.get_config("addr"))
|
|
92
|
-
assert snapshot.chat.get_basic_snapshot().is_protected == protect
|
|
93
90
|
|
|
94
91
|
# Test that Bob verified Alice's profile.
|
|
95
92
|
bob_contact_alice = bob.create_contact(alice)
|
|
@@ -125,8 +122,8 @@ def test_qr_securejoin_contact_request(acfactory) -> None:
|
|
|
125
122
|
bob_chat_alice = snapshot.chat
|
|
126
123
|
assert bob_chat_alice.get_basic_snapshot().is_contact_request
|
|
127
124
|
|
|
128
|
-
alice_chat = alice.create_group("
|
|
129
|
-
logging.info("Bob joins
|
|
125
|
+
alice_chat = alice.create_group("Group")
|
|
126
|
+
logging.info("Bob joins the group")
|
|
130
127
|
qr_code = alice_chat.get_qr_code()
|
|
131
128
|
bob.secure_join(qr_code)
|
|
132
129
|
while True:
|
|
@@ -150,8 +147,8 @@ def test_qr_readreceipt(acfactory) -> None:
|
|
|
150
147
|
for joiner in [bob, charlie]:
|
|
151
148
|
joiner.wait_for_securejoin_joiner_success()
|
|
152
149
|
|
|
153
|
-
logging.info("Alice creates a
|
|
154
|
-
group = alice.create_group("Group"
|
|
150
|
+
logging.info("Alice creates a group")
|
|
151
|
+
group = alice.create_group("Group")
|
|
155
152
|
|
|
156
153
|
alice_contact_bob = alice.create_contact(bob, "Bob")
|
|
157
154
|
alice_contact_charlie = alice.create_contact(charlie, "Charlie")
|
|
@@ -216,11 +213,10 @@ def test_verified_group_member_added_recovery(acfactory) -> None:
|
|
|
216
213
|
"""Tests verified group recovery by reverifying then removing and adding a member back."""
|
|
217
214
|
ac1, ac2, ac3 = acfactory.get_online_accounts(3)
|
|
218
215
|
|
|
219
|
-
logging.info("ac1 creates
|
|
220
|
-
chat = ac1.create_group("
|
|
221
|
-
assert chat.get_basic_snapshot().is_protected
|
|
216
|
+
logging.info("ac1 creates a group")
|
|
217
|
+
chat = ac1.create_group("Group")
|
|
222
218
|
|
|
223
|
-
logging.info("ac2 joins
|
|
219
|
+
logging.info("ac2 joins the group")
|
|
224
220
|
qr_code = chat.get_qr_code()
|
|
225
221
|
ac2.secure_join(qr_code)
|
|
226
222
|
ac2.wait_for_securejoin_joiner_success()
|
|
@@ -283,8 +279,10 @@ def test_verified_group_member_added_recovery(acfactory) -> None:
|
|
|
283
279
|
ac1_contact_ac2 = ac1.create_contact(ac2)
|
|
284
280
|
ac1_contact_ac3 = ac1.create_contact(ac3)
|
|
285
281
|
ac1_contact_ac2_snapshot = ac1_contact_ac2.get_snapshot()
|
|
286
|
-
|
|
287
|
-
|
|
282
|
+
# Until we reset verifications and then send the _verified header,
|
|
283
|
+
# verification is not gossiped here:
|
|
284
|
+
assert not ac1_contact_ac2_snapshot.is_verified
|
|
285
|
+
assert ac1_contact_ac2_snapshot.verifier_id != ac1_contact_ac3.id
|
|
288
286
|
|
|
289
287
|
|
|
290
288
|
def test_qr_join_chat_with_pending_bobstate_issue4894(acfactory):
|
|
@@ -302,8 +300,8 @@ def test_qr_join_chat_with_pending_bobstate_issue4894(acfactory):
|
|
|
302
300
|
# we first create a fully joined verified group, and then start
|
|
303
301
|
# joining a second time but interrupt it, to create pending bob state
|
|
304
302
|
|
|
305
|
-
logging.info("ac1: create
|
|
306
|
-
ch1 = ac1.create_group("Group"
|
|
303
|
+
logging.info("ac1: create a group that ac2 fully joins")
|
|
304
|
+
ch1 = ac1.create_group("Group")
|
|
307
305
|
qr_code = ch1.get_qr_code()
|
|
308
306
|
ac2.secure_join(qr_code)
|
|
309
307
|
ac1.wait_for_securejoin_inviter_success()
|
|
@@ -313,7 +311,6 @@ def test_qr_join_chat_with_pending_bobstate_issue4894(acfactory):
|
|
|
313
311
|
while 1:
|
|
314
312
|
snapshot = ac2.get_message_by_id(ac2.wait_for_incoming_msg_event().msg_id).get_snapshot()
|
|
315
313
|
if snapshot.text == "ac1 says hello":
|
|
316
|
-
assert snapshot.chat.get_basic_snapshot().is_protected
|
|
317
314
|
break
|
|
318
315
|
|
|
319
316
|
logging.info("ac1: let ac2 join again but shutoff ac1 in the middle of securejoin")
|
|
@@ -327,7 +324,7 @@ def test_qr_join_chat_with_pending_bobstate_issue4894(acfactory):
|
|
|
327
324
|
assert ac2.create_contact(ac3).get_snapshot().is_verified
|
|
328
325
|
|
|
329
326
|
logging.info("ac3: create a verified group VG with ac2")
|
|
330
|
-
vg = ac3.create_group("ac3-created"
|
|
327
|
+
vg = ac3.create_group("ac3-created")
|
|
331
328
|
vg.add_contact(ac3.create_contact(ac2))
|
|
332
329
|
|
|
333
330
|
# ensure ac2 receives message in VG
|
|
@@ -335,7 +332,6 @@ def test_qr_join_chat_with_pending_bobstate_issue4894(acfactory):
|
|
|
335
332
|
while 1:
|
|
336
333
|
msg = ac2.get_message_by_id(ac2.wait_for_incoming_msg_event().msg_id).get_snapshot()
|
|
337
334
|
if msg.text == "hello":
|
|
338
|
-
assert msg.chat.get_basic_snapshot().is_protected
|
|
339
335
|
break
|
|
340
336
|
|
|
341
337
|
logging.info("ac3: create a join-code for group VG and let ac4 join, check that ac2 got it")
|
|
@@ -359,7 +355,7 @@ def test_qr_new_group_unblocked(acfactory):
|
|
|
359
355
|
"""
|
|
360
356
|
|
|
361
357
|
ac1, ac2 = acfactory.get_online_accounts(2)
|
|
362
|
-
ac1_chat = ac1.create_group("Group for joining"
|
|
358
|
+
ac1_chat = ac1.create_group("Group for joining")
|
|
363
359
|
qr_code = ac1_chat.get_qr_code()
|
|
364
360
|
ac2.secure_join(qr_code)
|
|
365
361
|
|
|
@@ -384,8 +380,7 @@ def test_aeap_flow_verified(acfactory):
|
|
|
384
380
|
addr, password = acfactory.get_credentials()
|
|
385
381
|
|
|
386
382
|
logging.info("ac1: create verified-group QR, ac2 scans and joins")
|
|
387
|
-
chat = ac1.create_group("hello"
|
|
388
|
-
assert chat.get_basic_snapshot().is_protected
|
|
383
|
+
chat = ac1.create_group("hello")
|
|
389
384
|
qr_code = chat.get_qr_code()
|
|
390
385
|
logging.info("ac2: start QR-code based join-group protocol")
|
|
391
386
|
ac2.secure_join(qr_code)
|
|
@@ -439,7 +434,6 @@ def test_gossip_verification(acfactory) -> None:
|
|
|
439
434
|
|
|
440
435
|
logging.info("Bob creates an Autocrypt group")
|
|
441
436
|
bob_group_chat = bob.create_group("Autocrypt Group")
|
|
442
|
-
assert not bob_group_chat.get_basic_snapshot().is_protected
|
|
443
437
|
bob_group_chat.add_contact(bob_contact_alice)
|
|
444
438
|
bob_group_chat.add_contact(bob_contact_carol)
|
|
445
439
|
bob_group_chat.send_message(text="Hello Autocrypt group")
|
|
@@ -448,13 +442,14 @@ def test_gossip_verification(acfactory) -> None:
|
|
|
448
442
|
assert snapshot.text == "Hello Autocrypt group"
|
|
449
443
|
assert snapshot.show_padlock
|
|
450
444
|
|
|
451
|
-
#
|
|
445
|
+
# Group propagates verification using Autocrypt-Gossip header.
|
|
452
446
|
carol_contact_alice_snapshot = carol_contact_alice.get_snapshot()
|
|
447
|
+
# Until we reset verifications and then send the _verified header,
|
|
448
|
+
# verification is not gossiped here:
|
|
453
449
|
assert not carol_contact_alice_snapshot.is_verified
|
|
454
450
|
|
|
455
451
|
logging.info("Bob creates a Securejoin group")
|
|
456
|
-
bob_group_chat = bob.create_group("Securejoin Group"
|
|
457
|
-
assert bob_group_chat.get_basic_snapshot().is_protected
|
|
452
|
+
bob_group_chat = bob.create_group("Securejoin Group")
|
|
458
453
|
bob_group_chat.add_contact(bob_contact_alice)
|
|
459
454
|
bob_group_chat.add_contact(bob_contact_carol)
|
|
460
455
|
bob_group_chat.send_message(text="Hello Securejoin group")
|
|
@@ -465,7 +460,9 @@ def test_gossip_verification(acfactory) -> None:
|
|
|
465
460
|
|
|
466
461
|
# Securejoin propagates verification.
|
|
467
462
|
carol_contact_alice_snapshot = carol_contact_alice.get_snapshot()
|
|
468
|
-
|
|
463
|
+
# Until we reset verifications and then send the _verified header,
|
|
464
|
+
# verification is not gossiped here:
|
|
465
|
+
assert not carol_contact_alice_snapshot.is_verified
|
|
469
466
|
|
|
470
467
|
|
|
471
468
|
def test_securejoin_after_contact_resetup(acfactory) -> None:
|
|
@@ -477,7 +474,7 @@ def test_securejoin_after_contact_resetup(acfactory) -> None:
|
|
|
477
474
|
ac1, ac2, ac3 = acfactory.get_online_accounts(3)
|
|
478
475
|
|
|
479
476
|
# ac3 creates protected group with ac1.
|
|
480
|
-
ac3_chat = ac3.create_group("
|
|
477
|
+
ac3_chat = ac3.create_group("Group")
|
|
481
478
|
|
|
482
479
|
# ac1 joins ac3 group.
|
|
483
480
|
ac3_qr_code = ac3_chat.get_qr_code()
|
|
@@ -525,7 +522,6 @@ def test_securejoin_after_contact_resetup(acfactory) -> None:
|
|
|
525
522
|
snapshot = ac2.get_message_by_id(ac2.wait_for_incoming_msg_event().msg_id).get_snapshot()
|
|
526
523
|
assert snapshot.is_info
|
|
527
524
|
ac2_chat = snapshot.chat
|
|
528
|
-
assert ac2_chat.get_basic_snapshot().is_protected
|
|
529
525
|
assert len(ac2_chat.get_contacts()) == 3
|
|
530
526
|
|
|
531
527
|
# ac1 is still "not verified" for ac2 due to inconsistent state.
|
|
@@ -535,9 +531,8 @@ def test_securejoin_after_contact_resetup(acfactory) -> None:
|
|
|
535
531
|
def test_withdraw_securejoin_qr(acfactory):
|
|
536
532
|
alice, bob = acfactory.get_online_accounts(2)
|
|
537
533
|
|
|
538
|
-
logging.info("Alice creates a
|
|
539
|
-
alice_chat = alice.create_group("
|
|
540
|
-
assert alice_chat.get_basic_snapshot().is_protected
|
|
534
|
+
logging.info("Alice creates a group")
|
|
535
|
+
alice_chat = alice.create_group("Group")
|
|
541
536
|
logging.info("Bob joins verified group")
|
|
542
537
|
|
|
543
538
|
qr_code = alice_chat.get_qr_code()
|
|
@@ -548,7 +543,6 @@ def test_withdraw_securejoin_qr(acfactory):
|
|
|
548
543
|
|
|
549
544
|
snapshot = bob.get_message_by_id(bob.wait_for_incoming_msg_event().msg_id).get_snapshot()
|
|
550
545
|
assert snapshot.text == "Member Me added by {}.".format(alice.get_config("addr"))
|
|
551
|
-
assert snapshot.chat.get_basic_snapshot().is_protected
|
|
552
546
|
bob_chat.leave()
|
|
553
547
|
|
|
554
548
|
snapshot = alice.get_message_by_id(alice.wait_for_msgs_changed_event().msg_id).get_snapshot()
|
|
@@ -347,6 +347,7 @@ def test_receive_imf_failure(acfactory) -> None:
|
|
|
347
347
|
assert snapshot.download_state == DownloadState.AVAILABLE
|
|
348
348
|
assert snapshot.error is not None
|
|
349
349
|
assert snapshot.show_padlock
|
|
350
|
+
snapshot.chat.accept()
|
|
350
351
|
|
|
351
352
|
# The failed message doesn't break the IMAP loop.
|
|
352
353
|
bob.set_config("fail_on_receiving_full_msg", "0")
|
|
@@ -570,8 +571,11 @@ def test_provider_info(rpc) -> None:
|
|
|
570
571
|
assert provider_info is None
|
|
571
572
|
|
|
572
573
|
# Test MX record resolution.
|
|
574
|
+
# This previously resulted in Gmail provider
|
|
575
|
+
# because MX record pointed to google.com domain,
|
|
576
|
+
# but MX record resolution has been removed.
|
|
573
577
|
provider_info = rpc.get_provider_info(account_id, "github.com")
|
|
574
|
-
assert provider_info
|
|
578
|
+
assert provider_info is None
|
|
575
579
|
|
|
576
580
|
# Disable MX record resolution.
|
|
577
581
|
rpc.set_config(account_id, "proxy_enabled", "1")
|
|
@@ -813,7 +817,7 @@ def test_configured_imap_certificate_checks(acfactory):
|
|
|
813
817
|
alice = acfactory.new_configured_account()
|
|
814
818
|
|
|
815
819
|
# Certificate checks should be configured (not None)
|
|
816
|
-
assert "
|
|
820
|
+
assert "cert_strict" in alice.get_info().used_account_settings
|
|
817
821
|
|
|
818
822
|
# "cert_old_automatic" is the value old Delta Chat core versions used
|
|
819
823
|
# to mean user entered "imap_certificate_checks=0" (Automatic)
|
|
@@ -885,10 +889,12 @@ def test_rename_group(acfactory):
|
|
|
885
889
|
bob_msg = bob.wait_for_incoming_msg()
|
|
886
890
|
bob_chat = bob_msg.get_snapshot().chat
|
|
887
891
|
assert bob_chat.get_basic_snapshot().name == "Test group"
|
|
892
|
+
bob.wait_for_event(EventType.CHATLIST_ITEM_CHANGED)
|
|
888
893
|
|
|
889
894
|
for name in ["Baz", "Foo bar", "Xyzzy"]:
|
|
890
895
|
alice_group.set_name(name)
|
|
891
|
-
bob.
|
|
896
|
+
bob.wait_for_event(EventType.CHATLIST_ITEM_CHANGED)
|
|
897
|
+
bob.wait_for_event(EventType.CHATLIST_ITEM_CHANGED)
|
|
892
898
|
assert bob_chat.get_basic_snapshot().name == name
|
|
893
899
|
|
|
894
900
|
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
def test_vcard(acfactory) -> None:
|
|
2
|
+
alice, bob, fiona = acfactory.get_online_accounts(3)
|
|
3
|
+
|
|
4
|
+
bob.create_chat(alice)
|
|
5
|
+
alice_contact_bob = alice.create_contact(bob, "Bob")
|
|
6
|
+
alice_contact_charlie = alice.create_contact("charlie@example.org", "Charlie")
|
|
7
|
+
alice_contact_charlie_snapshot = alice_contact_charlie.get_snapshot()
|
|
8
|
+
alice_contact_fiona = alice.create_contact(fiona, "Fiona")
|
|
9
|
+
alice_contact_fiona_snapshot = alice_contact_fiona.get_snapshot()
|
|
10
|
+
|
|
11
|
+
alice_chat_bob = alice_contact_bob.create_chat()
|
|
12
|
+
alice_chat_bob.send_contact(alice_contact_charlie)
|
|
13
|
+
|
|
14
|
+
event = bob.wait_for_incoming_msg_event()
|
|
15
|
+
message = bob.get_message_by_id(event.msg_id)
|
|
16
|
+
snapshot = message.get_snapshot()
|
|
17
|
+
assert snapshot.vcard_contact
|
|
18
|
+
assert snapshot.vcard_contact.addr == "charlie@example.org"
|
|
19
|
+
assert snapshot.vcard_contact.color == alice_contact_charlie_snapshot.color
|
|
20
|
+
|
|
21
|
+
alice_chat_bob.send_contact(alice_contact_fiona)
|
|
22
|
+
event = bob.wait_for_incoming_msg_event()
|
|
23
|
+
message = bob.get_message_by_id(event.msg_id)
|
|
24
|
+
snapshot = message.get_snapshot()
|
|
25
|
+
assert snapshot.vcard_contact
|
|
26
|
+
assert snapshot.vcard_contact.key
|
|
27
|
+
assert snapshot.vcard_contact.color == alice_contact_fiona_snapshot.color
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
def test_vcard(acfactory) -> None:
|
|
2
|
-
alice, bob = acfactory.get_online_accounts(2)
|
|
3
|
-
|
|
4
|
-
alice_contact_bob = alice.create_contact(bob, "Bob")
|
|
5
|
-
alice_contact_charlie = alice.create_contact("charlie@example.org", "Charlie")
|
|
6
|
-
|
|
7
|
-
alice_chat_bob = alice_contact_bob.create_chat()
|
|
8
|
-
alice_chat_bob.send_contact(alice_contact_charlie)
|
|
9
|
-
|
|
10
|
-
event = bob.wait_for_incoming_msg_event()
|
|
11
|
-
message = bob.get_message_by_id(event.msg_id)
|
|
12
|
-
snapshot = message.get_snapshot()
|
|
13
|
-
assert snapshot.vcard_contact
|
|
14
|
-
assert snapshot.vcard_contact.addr == "charlie@example.org"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{deltachat_rpc_client-2.21.0 → deltachat_rpc_client-2.23.0}/src/deltachat_rpc_client/__init__.py
RENAMED
|
File without changes
|
{deltachat_rpc_client-2.21.0 → deltachat_rpc_client-2.23.0}/src/deltachat_rpc_client/_utils.py
RENAMED
|
File without changes
|
{deltachat_rpc_client-2.21.0 → deltachat_rpc_client-2.23.0}/src/deltachat_rpc_client/chat.py
RENAMED
|
File without changes
|
{deltachat_rpc_client-2.21.0 → deltachat_rpc_client-2.23.0}/src/deltachat_rpc_client/const.py
RENAMED
|
File without changes
|
{deltachat_rpc_client-2.21.0 → deltachat_rpc_client-2.23.0}/src/deltachat_rpc_client/contact.py
RENAMED
|
File without changes
|
{deltachat_rpc_client-2.21.0 → deltachat_rpc_client-2.23.0}/src/deltachat_rpc_client/deltachat.py
RENAMED
|
File without changes
|
{deltachat_rpc_client-2.21.0 → deltachat_rpc_client-2.23.0}/src/deltachat_rpc_client/events.py
RENAMED
|
File without changes
|
{deltachat_rpc_client-2.21.0 → deltachat_rpc_client-2.23.0}/src/deltachat_rpc_client/message.py
RENAMED
|
File without changes
|
{deltachat_rpc_client-2.21.0 → deltachat_rpc_client-2.23.0}/src/deltachat_rpc_client/py.typed
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|