deltachat-rpc-client 2.14.0__tar.gz → 2.15.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.

Files changed (33) hide show
  1. {deltachat_rpc_client-2.14.0/src/deltachat_rpc_client.egg-info → deltachat_rpc_client-2.15.0}/PKG-INFO +1 -1
  2. {deltachat_rpc_client-2.14.0 → deltachat_rpc_client-2.15.0}/pyproject.toml +1 -1
  3. {deltachat_rpc_client-2.14.0 → deltachat_rpc_client-2.15.0}/src/deltachat_rpc_client/chat.py +5 -0
  4. {deltachat_rpc_client-2.14.0 → deltachat_rpc_client-2.15.0}/src/deltachat_rpc_client/const.py +4 -0
  5. {deltachat_rpc_client-2.14.0 → deltachat_rpc_client-2.15.0}/src/deltachat_rpc_client/message.py +8 -0
  6. {deltachat_rpc_client-2.14.0 → deltachat_rpc_client-2.15.0/src/deltachat_rpc_client.egg-info}/PKG-INFO +1 -1
  7. {deltachat_rpc_client-2.14.0 → deltachat_rpc_client-2.15.0}/src/deltachat_rpc_client.egg-info/SOURCES.txt +1 -0
  8. deltachat_rpc_client-2.15.0/tests/test_calls.py +25 -0
  9. {deltachat_rpc_client-2.14.0 → deltachat_rpc_client-2.15.0}/LICENSE +0 -0
  10. {deltachat_rpc_client-2.14.0 → deltachat_rpc_client-2.15.0}/README.md +0 -0
  11. {deltachat_rpc_client-2.14.0 → deltachat_rpc_client-2.15.0}/setup.cfg +0 -0
  12. {deltachat_rpc_client-2.14.0 → deltachat_rpc_client-2.15.0}/src/deltachat_rpc_client/__init__.py +0 -0
  13. {deltachat_rpc_client-2.14.0 → deltachat_rpc_client-2.15.0}/src/deltachat_rpc_client/_utils.py +0 -0
  14. {deltachat_rpc_client-2.14.0 → deltachat_rpc_client-2.15.0}/src/deltachat_rpc_client/account.py +0 -0
  15. {deltachat_rpc_client-2.14.0 → deltachat_rpc_client-2.15.0}/src/deltachat_rpc_client/client.py +0 -0
  16. {deltachat_rpc_client-2.14.0 → deltachat_rpc_client-2.15.0}/src/deltachat_rpc_client/contact.py +0 -0
  17. {deltachat_rpc_client-2.14.0 → deltachat_rpc_client-2.15.0}/src/deltachat_rpc_client/deltachat.py +0 -0
  18. {deltachat_rpc_client-2.14.0 → deltachat_rpc_client-2.15.0}/src/deltachat_rpc_client/events.py +0 -0
  19. {deltachat_rpc_client-2.14.0 → deltachat_rpc_client-2.15.0}/src/deltachat_rpc_client/py.typed +0 -0
  20. {deltachat_rpc_client-2.14.0 → deltachat_rpc_client-2.15.0}/src/deltachat_rpc_client/pytestplugin.py +0 -0
  21. {deltachat_rpc_client-2.14.0 → deltachat_rpc_client-2.15.0}/src/deltachat_rpc_client/rpc.py +0 -0
  22. {deltachat_rpc_client-2.14.0 → deltachat_rpc_client-2.15.0}/src/deltachat_rpc_client.egg-info/dependency_links.txt +0 -0
  23. {deltachat_rpc_client-2.14.0 → deltachat_rpc_client-2.15.0}/src/deltachat_rpc_client.egg-info/entry_points.txt +0 -0
  24. {deltachat_rpc_client-2.14.0 → deltachat_rpc_client-2.15.0}/src/deltachat_rpc_client.egg-info/top_level.txt +0 -0
  25. {deltachat_rpc_client-2.14.0 → deltachat_rpc_client-2.15.0}/tests/test_account_events.py +0 -0
  26. {deltachat_rpc_client-2.14.0 → deltachat_rpc_client-2.15.0}/tests/test_chatlist_events.py +0 -0
  27. {deltachat_rpc_client-2.14.0 → deltachat_rpc_client-2.15.0}/tests/test_iroh_webxdc.py +0 -0
  28. {deltachat_rpc_client-2.14.0 → deltachat_rpc_client-2.15.0}/tests/test_key_transfer.py +0 -0
  29. {deltachat_rpc_client-2.14.0 → deltachat_rpc_client-2.15.0}/tests/test_multidevice.py +0 -0
  30. {deltachat_rpc_client-2.14.0 → deltachat_rpc_client-2.15.0}/tests/test_securejoin.py +0 -0
  31. {deltachat_rpc_client-2.14.0 → deltachat_rpc_client-2.15.0}/tests/test_something.py +0 -0
  32. {deltachat_rpc_client-2.14.0 → deltachat_rpc_client-2.15.0}/tests/test_vcard.py +0 -0
  33. {deltachat_rpc_client-2.14.0 → deltachat_rpc_client-2.15.0}/tests/test_webxdc.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: deltachat-rpc-client
3
- Version: 2.14.0
3
+ Version: 2.15.0
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
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "deltachat-rpc-client"
7
- version = "2.14.0"
7
+ version = "2.15.0"
8
8
  description = "Python client for Delta Chat core JSON-RPC interface"
9
9
  classifiers = [
10
10
  "Development Status :: 5 - Production/Stable",
@@ -289,3 +289,8 @@ class Chat:
289
289
  f.write(vcard.encode())
290
290
  f.flush()
291
291
  self._rpc.send_msg(self.account.id, self.id, {"viewtype": ViewType.VCARD, "file": f.name})
292
+
293
+ def place_outgoing_call(self, place_call_info: str) -> Message:
294
+ """Starts an outgoing call."""
295
+ msg_id = self._rpc.place_outgoing_call(self.account.id, self.id, place_call_info)
296
+ return Message(self.account, msg_id)
@@ -73,6 +73,10 @@ class EventType(str, Enum):
73
73
  CHATLIST_ITEM_CHANGED = "ChatlistItemChanged"
74
74
  ACCOUNTS_CHANGED = "AccountsChanged"
75
75
  ACCOUNTS_ITEM_CHANGED = "AccountsItemChanged"
76
+ INCOMING_CALL = "IncomingCall"
77
+ INCOMING_CALL_ACCEPTED = "IncomingCallAccepted"
78
+ OUTGOING_CALL_ACCEPTED = "OutgoingCallAccepted"
79
+ CALL_ENDED = "CallEnded"
76
80
  CONFIG_SYNCED = "ConfigSynced"
77
81
  WEBXDC_REALTIME_DATA = "WebxdcRealtimeData"
78
82
  WEBXDC_REALTIME_ADVERTISEMENT_RECEIVED = "WebxdcRealtimeAdvertisementReceived"
@@ -102,3 +102,11 @@ class Message:
102
102
  def send_webxdc_realtime_data(self, data) -> None:
103
103
  """Send data to the realtime channel."""
104
104
  yield self._rpc.send_webxdc_realtime_data.future(self.account.id, self.id, list(data))
105
+
106
+ def accept_incoming_call(self, accept_call_info):
107
+ """Accepts an incoming call."""
108
+ self._rpc.accept_incoming_call(self.account.id, self.id, accept_call_info)
109
+
110
+ def end_call(self):
111
+ """Ends incoming or outgoing call."""
112
+ self._rpc.end_call(self.account.id, self.id)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: deltachat-rpc-client
3
- Version: 2.14.0
3
+ Version: 2.15.0
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
@@ -20,6 +20,7 @@ src/deltachat_rpc_client.egg-info/dependency_links.txt
20
20
  src/deltachat_rpc_client.egg-info/entry_points.txt
21
21
  src/deltachat_rpc_client.egg-info/top_level.txt
22
22
  tests/test_account_events.py
23
+ tests/test_calls.py
23
24
  tests/test_chatlist_events.py
24
25
  tests/test_iroh_webxdc.py
25
26
  tests/test_key_transfer.py
@@ -0,0 +1,25 @@
1
+ from deltachat_rpc_client import EventType, Message
2
+
3
+
4
+ def test_calls(acfactory) -> None:
5
+ alice, bob = acfactory.get_online_accounts(2)
6
+
7
+ place_call_info = "offer"
8
+ accept_call_info = "answer"
9
+
10
+ alice_contact_bob = alice.create_contact(bob, "Bob")
11
+ alice_chat_bob = alice_contact_bob.create_chat()
12
+ outgoing_call_message = alice_chat_bob.place_outgoing_call(place_call_info)
13
+
14
+ incoming_call_event = bob.wait_for_event(EventType.INCOMING_CALL)
15
+ assert incoming_call_event.place_call_info == place_call_info
16
+ incoming_call_message = Message(bob, incoming_call_event.msg_id)
17
+
18
+ incoming_call_message.accept_incoming_call(accept_call_info)
19
+ outgoing_call_accepted_event = alice.wait_for_event(EventType.OUTGOING_CALL_ACCEPTED)
20
+ assert outgoing_call_accepted_event.accept_call_info == accept_call_info
21
+
22
+ outgoing_call_message.end_call()
23
+
24
+ end_call_event = bob.wait_for_event(EventType.CALL_ENDED)
25
+ assert end_call_event.msg_id == outgoing_call_message.id