deltachat-rpc-client 1.158.0__py3-none-any.whl → 1.159.1__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.
@@ -1,4 +1,5 @@
1
1
  import argparse
2
+ import os
2
3
  import re
3
4
  import sys
4
5
  from threading import Thread
@@ -89,8 +90,8 @@ def _run_cli(
89
90
  help="accounts folder (default: current working directory)",
90
91
  nargs="?",
91
92
  )
92
- parser.add_argument("--email", action="store", help="email address")
93
- parser.add_argument("--password", action="store", help="password")
93
+ parser.add_argument("--email", action="store", help="email address", default=os.getenv("DELTACHAT_EMAIL"))
94
+ parser.add_argument("--password", action="store", help="password", default=os.getenv("DELTACHAT_PASSWORD"))
94
95
  args = parser.parse_args(argv[1:])
95
96
 
96
97
  with Rpc(accounts_dir=args.accounts_dir, **kwargs) as rpc:
@@ -110,6 +110,11 @@ class Account:
110
110
  """Configure an account."""
111
111
  yield self._rpc.configure.future(self.id)
112
112
 
113
+ @futuremethod
114
+ def add_transport(self, params):
115
+ """Add a new transport."""
116
+ yield self._rpc.add_transport.future(self.id, params)
117
+
113
118
  def bring_online(self):
114
119
  """Start I/O and wait until IMAP becomes IDLE."""
115
120
  self.start_io()
@@ -48,6 +48,7 @@ class EventType(str, Enum):
48
48
  MSG_READ = "MsgRead"
49
49
  MSG_DELETED = "MsgDeleted"
50
50
  CHAT_MODIFIED = "ChatModified"
51
+ CHAT_DELETED = "ChatDeleted"
51
52
  CHAT_EPHEMERAL_TIMER_MODIFIED = "ChatEphemeralTimerModified"
52
53
  CONTACTS_CHANGED = "ContactsChanged"
53
54
  LOCATION_CHANGED = "LocationChanged"
@@ -64,6 +64,10 @@ class Message:
64
64
  def get_webxdc_status_updates(self, last_known_serial: int = 0) -> list:
65
65
  return json.loads(self._rpc.get_webxdc_status_updates(self.account.id, self.id, last_known_serial))
66
66
 
67
+ def get_info(self) -> str:
68
+ """Return message info."""
69
+ return self._rpc.get_message_info(self.account.id, self.id)
70
+
67
71
  def get_webxdc_info(self) -> dict:
68
72
  return self._rpc.get_webxdc_info(self.account.id, self.id)
69
73
 
@@ -34,7 +34,7 @@ class ACFactory:
34
34
  addr, password = self.get_credentials()
35
35
  account = self.get_unconfigured_account()
36
36
  params = {"addr": addr, "password": password}
37
- yield account._rpc.add_transport.future(account.id, params)
37
+ yield account.add_transport.future(params)
38
38
 
39
39
  assert account.is_configured()
40
40
  return account
@@ -79,7 +79,7 @@ class ACFactory:
79
79
  ) -> Message:
80
80
  if not from_account:
81
81
  from_account = (self.get_online_accounts(1))[0]
82
- to_contact = from_account.create_contact(to_account.get_config("addr"))
82
+ to_contact = from_account.create_contact(to_account)
83
83
  if group:
84
84
  to_chat = from_account.create_group(group)
85
85
  to_chat.add_contact(to_contact)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: deltachat-rpc-client
3
- Version: 1.158.0
3
+ Version: 1.159.1
4
4
  Summary: Python client for Delta Chat core JSON-RPC interface
5
5
  Classifier: Development Status :: 5 - Production/Stable
6
6
  Classifier: Intended Audience :: Developers
@@ -1,19 +1,19 @@
1
1
  deltachat_rpc_client/__init__.py,sha256=L19BWnRu9TMF--jQ7e5Asgme951WGsldrTknW86KyTg,566
2
- deltachat_rpc_client/_utils.py,sha256=pLOV_pxS2MRreLtq-5rnKJp-BP0m8T4LcbJ8N7Xy-D0,6304
3
- deltachat_rpc_client/account.py,sha256=P4R_DMsVdyWu3qj4q2orwDa273Pg5Z16yivssPU6Eu4,15798
2
+ deltachat_rpc_client/_utils.py,sha256=FnmjEIU3pvr3y9jqFAvil8GUHzXNm2dDVNxsIJTZEMI,6393
3
+ deltachat_rpc_client/account.py,sha256=JlLvaGEhkwXLwW4cMUMgd3-fcqOM8TjBsLHlXvzVhoE,15951
4
4
  deltachat_rpc_client/chat.py,sha256=1pbuEBWBjZDD9qQ3U1hY5jozzx0MSs9Ybpw33reA2MU,11208
5
5
  deltachat_rpc_client/client.py,sha256=yyXt2USkBeTsqNxtXZNNUqdsPVkqEUHYf7C-5JFmX7s,7043
6
- deltachat_rpc_client/const.py,sha256=geXY_H-JHn2HLsYPAAWbwnX5LOksU7zqDZh3AOwmUpg,5577
6
+ deltachat_rpc_client/const.py,sha256=39o1czdW4COf5qH60B7G_vPF3eyeC42tpgIKcejtK8Q,5610
7
7
  deltachat_rpc_client/contact.py,sha256=kbqVI93V7-VSCjH8Hfm5M9a62HMnOjBKuw_g6iJN7w8,1966
8
8
  deltachat_rpc_client/deltachat.py,sha256=c22_2GX71we6JwQ4yjP-S89mrUYPPbEb3rrPwHHeXt4,1538
9
9
  deltachat_rpc_client/events.py,sha256=qYgydsbuWYxQ1PO5ms-D8I5aHpTIiQ6Fg9p23QTvqf0,9877
10
- deltachat_rpc_client/message.py,sha256=LVgQTzgaTS-24NPqSLYjgCtyz9PiTPWQgO0c_j9tIs4,3021
10
+ deltachat_rpc_client/message.py,sha256=6Jf2WlOp8HOYpjPLXXa_5_rGTg6wVN27PXnF3XIjpGQ,3156
11
11
  deltachat_rpc_client/py.typed,sha256=nGQ9Itq-bkXBn5Ri1JIR0oYnDNv7LDRfkowxBSSqVTM,60
12
- deltachat_rpc_client/pytestplugin.py,sha256=c1KSv6mc2UGzmfgr8C6_7-6WqTdE97S9QDhuukLv02Y,4900
12
+ deltachat_rpc_client/pytestplugin.py,sha256=bbhhqAdXiHh-DUbJMmfbS4ZXh8ZAjF3PJ9waZy_hOV0,4864
13
13
  deltachat_rpc_client/rpc.py,sha256=7RIdyEDwOXU0ACU0LanVqTT1RuIDci5iDr7dNEDE_tE,6554
14
- deltachat_rpc_client-1.158.0.dist-info/licenses/LICENSE,sha256=Pz2eACSxkhsGfW9_iN60pgy-enjnbGTj8df8O3ebnQQ,16726
15
- deltachat_rpc_client-1.158.0.dist-info/METADATA,sha256=5L0z-yQbsvJkMpuc56GD3a2y28aYpXUSggVA9pyLWMo,2175
16
- deltachat_rpc_client-1.158.0.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
17
- deltachat_rpc_client-1.158.0.dist-info/entry_points.txt,sha256=VHpX6EnKBaNj89qJWctApThnMa8suyaamfZEnQacXgc,81
18
- deltachat_rpc_client-1.158.0.dist-info/top_level.txt,sha256=ePNMkY10htGrLiLydH1ITvYFM3LcTEa51HyPqJ40hDk,21
19
- deltachat_rpc_client-1.158.0.dist-info/RECORD,,
14
+ deltachat_rpc_client-1.159.1.dist-info/licenses/LICENSE,sha256=Pz2eACSxkhsGfW9_iN60pgy-enjnbGTj8df8O3ebnQQ,16726
15
+ deltachat_rpc_client-1.159.1.dist-info/METADATA,sha256=Y-xGg3NqIHI6GXwAkKuoGe7HJW37IvzCbj6yYJ77hYQ,2175
16
+ deltachat_rpc_client-1.159.1.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
17
+ deltachat_rpc_client-1.159.1.dist-info/entry_points.txt,sha256=VHpX6EnKBaNj89qJWctApThnMa8suyaamfZEnQacXgc,81
18
+ deltachat_rpc_client-1.159.1.dist-info/top_level.txt,sha256=ePNMkY10htGrLiLydH1ITvYFM3LcTEa51HyPqJ40hDk,21
19
+ deltachat_rpc_client-1.159.1.dist-info/RECORD,,