diff --git a/python/CHANGELOG b/python/CHANGELOG index 19e50f72e..5190bfab4 100644 --- a/python/CHANGELOG +++ b/python/CHANGELOG @@ -1,9 +1,11 @@ -1.40.x +1.40.1 --------------- - emit "ac_member_removed" event (with 'actor' being the removed contact) for when a user leaves a group. +- fix create_contact(addr) when addr is the self-contact. + 1.40.0 --------------- diff --git a/python/src/deltachat/account.py b/python/src/deltachat/account.py index f2b7b1cff..e8e7dd04d 100644 --- a/python/src/deltachat/account.py +++ b/python/src/deltachat/account.py @@ -246,7 +246,6 @@ class Account(object): addr = as_dc_charpointer(addr) name = as_dc_charpointer(name) contact_id = lib.dc_create_contact(self._dc_context, name, addr) - assert contact_id > const.DC_CHAT_ID_LAST_SPECIAL, contact_id return Contact(self, contact_id) def delete_contact(self, contact): diff --git a/python/tests/test_account.py b/python/tests/test_account.py index 8613f813e..b340caa2d 100644 --- a/python/tests/test_account.py +++ b/python/tests/test_account.py @@ -129,6 +129,11 @@ class TestOfflineContact: assert not contact1.is_blocked() assert not contact1.is_verified() + def test_create_self_contact(self, acfactory): + ac1 = acfactory.get_configured_offline_account() + contact1 = ac1.create_contact(ac1.get_config("addr")) + assert contact1.id == 1 + def test_get_contacts_and_delete(self, acfactory): ac1 = acfactory.get_configured_offline_account() contact1 = ac1.create_contact("some1@example.org", name="some1")