deltachat-rpc-client 2.22.0__py3-none-any.whl → 2.24.0__py3-none-any.whl
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.
- deltachat_rpc_client/account.py +8 -7
- deltachat_rpc_client/client.py +2 -3
- deltachat_rpc_client/message.py +11 -0
- deltachat_rpc_client/pytestplugin.py +6 -7
- {deltachat_rpc_client-2.22.0.dist-info → deltachat_rpc_client-2.24.0.dist-info}/METADATA +1 -1
- {deltachat_rpc_client-2.22.0.dist-info → deltachat_rpc_client-2.24.0.dist-info}/RECORD +10 -10
- {deltachat_rpc_client-2.22.0.dist-info → deltachat_rpc_client-2.24.0.dist-info}/WHEEL +0 -0
- {deltachat_rpc_client-2.22.0.dist-info → deltachat_rpc_client-2.24.0.dist-info}/entry_points.txt +0 -0
- {deltachat_rpc_client-2.22.0.dist-info → deltachat_rpc_client-2.24.0.dist-info}/licenses/LICENSE +0 -0
- {deltachat_rpc_client-2.22.0.dist-info → deltachat_rpc_client-2.24.0.dist-info}/top_level.txt +0 -0
deltachat_rpc_client/account.py
CHANGED
|
@@ -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,15 +322,11 @@ 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
|
-
"""Create a new **broadcast channel**
|
|
329
|
+
"""Create a new, outgoing **broadcast channel**
|
|
329
330
|
(called "Channel" in the UI).
|
|
330
331
|
|
|
331
332
|
Broadcast channels are similar to groups on the sending device,
|
deltachat_rpc_client/client.py
CHANGED
|
@@ -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/message.py
CHANGED
|
@@ -93,6 +93,17 @@ class Message:
|
|
|
93
93
|
if event.kind == EventType.MSG_DELIVERED and event.msg_id == self.id:
|
|
94
94
|
break
|
|
95
95
|
|
|
96
|
+
def resend(self) -> None:
|
|
97
|
+
"""Resend messages and make information available for newly added chat members.
|
|
98
|
+
Resending sends out the original message, however, recipients and webxdc-status may differ.
|
|
99
|
+
Clients that already have the original message can still ignore the resent message as
|
|
100
|
+
they have tracked the state by dedicated updates.
|
|
101
|
+
|
|
102
|
+
Some messages cannot be resent, eg. info-messages, drafts, already pending messages,
|
|
103
|
+
or messages that are not sent by SELF.
|
|
104
|
+
"""
|
|
105
|
+
self._rpc.resend_messages(self.account.id, [self.id])
|
|
106
|
+
|
|
96
107
|
@futuremethod
|
|
97
108
|
def send_webxdc_realtime_advertisement(self):
|
|
98
109
|
"""Send an advertisement to join the realtime channel."""
|
|
@@ -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:
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
deltachat_rpc_client/__init__.py,sha256=zroJARiq9HBi7Ln03KlICOUJHSjm3CGIFkHfXILEdOQ,567
|
|
2
2
|
deltachat_rpc_client/_utils.py,sha256=v0iWVSa6S-s078GgnnhflCRhA9pfWI-CfK8mjZ4zjXc,6393
|
|
3
|
-
deltachat_rpc_client/account.py,sha256=
|
|
3
|
+
deltachat_rpc_client/account.py,sha256=kJnqWgWIn7EMFtf1aEwyKpAgkHU_8lc6Zd_aheTLOp0,19072
|
|
4
4
|
deltachat_rpc_client/chat.py,sha256=x5CEIORL1-731QC4KcXd_0JKtRpe7nT9oAygmKkooHI,11707
|
|
5
|
-
deltachat_rpc_client/client.py,sha256=
|
|
5
|
+
deltachat_rpc_client/client.py,sha256=6eP_lH5z7G5Sy7vDRNfKNY3dkUqJqKZDVyCGjynsuW8,7181
|
|
6
6
|
deltachat_rpc_client/const.py,sha256=1SQ-TPm1w1lDGW8G_k4RwR6XA5xK6He_3hxhXBJCKmE,6652
|
|
7
7
|
deltachat_rpc_client/contact.py,sha256=NLh1XNnD_LQf27pNcVgqNN97Gbv190VSCuEyjjce4L4,1893
|
|
8
8
|
deltachat_rpc_client/deltachat.py,sha256=4KpiHbpfXM_LmbG-OvtDACK9W09UH0tsJyFunfH9TR4,1544
|
|
9
9
|
deltachat_rpc_client/events.py,sha256=Y45LoGlQy0i1U-LhoqF9njqJWA8v4b-XHfXZ4VOr1TQ,10205
|
|
10
|
-
deltachat_rpc_client/message.py,sha256=
|
|
10
|
+
deltachat_rpc_client/message.py,sha256=PWSm5e-woWgYXPcnwygQO0fNSRV-NvKvuerqWkJxiik,4996
|
|
11
11
|
deltachat_rpc_client/py.typed,sha256=nGQ9Itq-bkXBn5Ri1JIR0oYnDNv7LDRfkowxBSSqVTM,60
|
|
12
|
-
deltachat_rpc_client/pytestplugin.py,sha256=
|
|
12
|
+
deltachat_rpc_client/pytestplugin.py,sha256=LINsTZ-ICKhUzvjmrJe7kZsJAAj5wGA5btbH1vkDGWY,5622
|
|
13
13
|
deltachat_rpc_client/rpc.py,sha256=AUY8UJP7NlRSE5ewJs9jGxJdK8etKqsCEFWiIqnX5T8,6981
|
|
14
|
-
deltachat_rpc_client-2.
|
|
15
|
-
deltachat_rpc_client-2.
|
|
16
|
-
deltachat_rpc_client-2.
|
|
17
|
-
deltachat_rpc_client-2.
|
|
18
|
-
deltachat_rpc_client-2.
|
|
19
|
-
deltachat_rpc_client-2.
|
|
14
|
+
deltachat_rpc_client-2.24.0.dist-info/licenses/LICENSE,sha256=Pz2eACSxkhsGfW9_iN60pgy-enjnbGTj8df8O3ebnQQ,16726
|
|
15
|
+
deltachat_rpc_client-2.24.0.dist-info/METADATA,sha256=qGvHMHCE2xhorbGofFafP5EphxYUUxpUgU2As9MwmdA,2225
|
|
16
|
+
deltachat_rpc_client-2.24.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
17
|
+
deltachat_rpc_client-2.24.0.dist-info/entry_points.txt,sha256=VHpX6EnKBaNj89qJWctApThnMa8suyaamfZEnQacXgc,81
|
|
18
|
+
deltachat_rpc_client-2.24.0.dist-info/top_level.txt,sha256=ePNMkY10htGrLiLydH1ITvYFM3LcTEa51HyPqJ40hDk,21
|
|
19
|
+
deltachat_rpc_client-2.24.0.dist-info/RECORD,,
|
|
File without changes
|
{deltachat_rpc_client-2.22.0.dist-info → deltachat_rpc_client-2.24.0.dist-info}/entry_points.txt
RENAMED
|
File without changes
|
{deltachat_rpc_client-2.22.0.dist-info → deltachat_rpc_client-2.24.0.dist-info}/licenses/LICENSE
RENAMED
|
File without changes
|
{deltachat_rpc_client-2.22.0.dist-info → deltachat_rpc_client-2.24.0.dist-info}/top_level.txt
RENAMED
|
File without changes
|