deltachat-rpc-client 2.9.0__tar.gz → 2.10.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 (32) hide show
  1. {deltachat_rpc_client-2.9.0/src/deltachat_rpc_client.egg-info → deltachat_rpc_client-2.10.0}/PKG-INFO +1 -1
  2. {deltachat_rpc_client-2.9.0 → deltachat_rpc_client-2.10.0}/pyproject.toml +1 -1
  3. {deltachat_rpc_client-2.9.0 → deltachat_rpc_client-2.10.0}/src/deltachat_rpc_client/account.py +15 -1
  4. {deltachat_rpc_client-2.9.0 → deltachat_rpc_client-2.10.0/src/deltachat_rpc_client.egg-info}/PKG-INFO +1 -1
  5. {deltachat_rpc_client-2.9.0 → deltachat_rpc_client-2.10.0}/tests/test_something.py +4 -1
  6. {deltachat_rpc_client-2.9.0 → deltachat_rpc_client-2.10.0}/LICENSE +0 -0
  7. {deltachat_rpc_client-2.9.0 → deltachat_rpc_client-2.10.0}/README.md +0 -0
  8. {deltachat_rpc_client-2.9.0 → deltachat_rpc_client-2.10.0}/setup.cfg +0 -0
  9. {deltachat_rpc_client-2.9.0 → deltachat_rpc_client-2.10.0}/src/deltachat_rpc_client/__init__.py +0 -0
  10. {deltachat_rpc_client-2.9.0 → deltachat_rpc_client-2.10.0}/src/deltachat_rpc_client/_utils.py +0 -0
  11. {deltachat_rpc_client-2.9.0 → deltachat_rpc_client-2.10.0}/src/deltachat_rpc_client/chat.py +0 -0
  12. {deltachat_rpc_client-2.9.0 → deltachat_rpc_client-2.10.0}/src/deltachat_rpc_client/client.py +0 -0
  13. {deltachat_rpc_client-2.9.0 → deltachat_rpc_client-2.10.0}/src/deltachat_rpc_client/const.py +0 -0
  14. {deltachat_rpc_client-2.9.0 → deltachat_rpc_client-2.10.0}/src/deltachat_rpc_client/contact.py +0 -0
  15. {deltachat_rpc_client-2.9.0 → deltachat_rpc_client-2.10.0}/src/deltachat_rpc_client/deltachat.py +0 -0
  16. {deltachat_rpc_client-2.9.0 → deltachat_rpc_client-2.10.0}/src/deltachat_rpc_client/events.py +0 -0
  17. {deltachat_rpc_client-2.9.0 → deltachat_rpc_client-2.10.0}/src/deltachat_rpc_client/message.py +0 -0
  18. {deltachat_rpc_client-2.9.0 → deltachat_rpc_client-2.10.0}/src/deltachat_rpc_client/py.typed +0 -0
  19. {deltachat_rpc_client-2.9.0 → deltachat_rpc_client-2.10.0}/src/deltachat_rpc_client/pytestplugin.py +0 -0
  20. {deltachat_rpc_client-2.9.0 → deltachat_rpc_client-2.10.0}/src/deltachat_rpc_client/rpc.py +0 -0
  21. {deltachat_rpc_client-2.9.0 → deltachat_rpc_client-2.10.0}/src/deltachat_rpc_client.egg-info/SOURCES.txt +0 -0
  22. {deltachat_rpc_client-2.9.0 → deltachat_rpc_client-2.10.0}/src/deltachat_rpc_client.egg-info/dependency_links.txt +0 -0
  23. {deltachat_rpc_client-2.9.0 → deltachat_rpc_client-2.10.0}/src/deltachat_rpc_client.egg-info/entry_points.txt +0 -0
  24. {deltachat_rpc_client-2.9.0 → deltachat_rpc_client-2.10.0}/src/deltachat_rpc_client.egg-info/top_level.txt +0 -0
  25. {deltachat_rpc_client-2.9.0 → deltachat_rpc_client-2.10.0}/tests/test_account_events.py +0 -0
  26. {deltachat_rpc_client-2.9.0 → deltachat_rpc_client-2.10.0}/tests/test_chatlist_events.py +0 -0
  27. {deltachat_rpc_client-2.9.0 → deltachat_rpc_client-2.10.0}/tests/test_iroh_webxdc.py +0 -0
  28. {deltachat_rpc_client-2.9.0 → deltachat_rpc_client-2.10.0}/tests/test_key_transfer.py +0 -0
  29. {deltachat_rpc_client-2.9.0 → deltachat_rpc_client-2.10.0}/tests/test_multidevice.py +0 -0
  30. {deltachat_rpc_client-2.9.0 → deltachat_rpc_client-2.10.0}/tests/test_securejoin.py +0 -0
  31. {deltachat_rpc_client-2.9.0 → deltachat_rpc_client-2.10.0}/tests/test_vcard.py +0 -0
  32. {deltachat_rpc_client-2.9.0 → deltachat_rpc_client-2.10.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.9.0
3
+ Version: 2.10.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.9.0"
7
+ version = "2.10.0"
8
8
  description = "Python client for Delta Chat core JSON-RPC interface"
9
9
  classifiers = [
10
10
  "Development Status :: 5 - Production/Stable",
@@ -185,7 +185,21 @@ class Account:
185
185
  return Contact(self, contact_id)
186
186
 
187
187
  def get_contact_by_addr(self, address: str) -> Optional[Contact]:
188
- """Check if an e-mail address belongs to a known and unblocked contact."""
188
+ """Looks up a known and unblocked contact with a given e-mail address.
189
+ To get a list of all known and unblocked contacts, use contacts_get_contacts().
190
+
191
+ **POTENTIAL SECURITY ISSUE**: If there are multiple contacts with this address
192
+ (e.g. an address-contact and a key-contact),
193
+ this looks up the most recently seen contact,
194
+ i.e. which contact is returned depends on which contact last sent a message.
195
+ If the user just clicked on a mailto: link, then this is the best thing you can do.
196
+ But **DO NOT** internally represent contacts by their email address
197
+ and do not use this function to look them up;
198
+ otherwise this function will sometimes look up the wrong contact.
199
+ Instead, you should internally represent contacts by their ids.
200
+
201
+ To validate an e-mail address independently of the contact database
202
+ use check_email_validity()."""
189
203
  contact_id = self._rpc.lookup_contact_id_by_addr(self.id, address)
190
204
  return contact_id and Contact(self, contact_id)
191
205
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: deltachat-rpc-client
3
- Version: 2.9.0
3
+ Version: 2.10.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
@@ -171,7 +171,10 @@ def test_account(acfactory) -> None:
171
171
  assert alice.get_size()
172
172
  assert alice.is_configured()
173
173
  assert not alice.get_avatar()
174
- assert alice.get_contact_by_addr(bob_addr) is None # There is no address-contact, only key-contact
174
+ # get_contact_by_addr() can lookup a key contact by address:
175
+ bob_contact = alice.get_contact_by_addr(bob_addr).get_snapshot()
176
+ assert bob_contact.display_name == "Bob"
177
+ assert bob_contact.is_key_contact
175
178
  assert alice.get_contacts()
176
179
  assert alice.get_contacts(snapshot=True)
177
180
  assert alice.self_contact