mirror of
https://github.com/chatmail/core.git
synced 2026-05-08 17:36:29 +03:00
fix bug reported by @adbenitez
This commit is contained in:
@@ -1,9 +1,11 @@
|
|||||||
1.40.x
|
1.40.1
|
||||||
---------------
|
---------------
|
||||||
|
|
||||||
- emit "ac_member_removed" event (with 'actor' being the removed contact)
|
- emit "ac_member_removed" event (with 'actor' being the removed contact)
|
||||||
for when a user leaves a group.
|
for when a user leaves a group.
|
||||||
|
|
||||||
|
- fix create_contact(addr) when addr is the self-contact.
|
||||||
|
|
||||||
|
|
||||||
1.40.0
|
1.40.0
|
||||||
---------------
|
---------------
|
||||||
|
|||||||
@@ -246,7 +246,6 @@ class Account(object):
|
|||||||
addr = as_dc_charpointer(addr)
|
addr = as_dc_charpointer(addr)
|
||||||
name = as_dc_charpointer(name)
|
name = as_dc_charpointer(name)
|
||||||
contact_id = lib.dc_create_contact(self._dc_context, name, addr)
|
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)
|
return Contact(self, contact_id)
|
||||||
|
|
||||||
def delete_contact(self, contact):
|
def delete_contact(self, contact):
|
||||||
|
|||||||
@@ -129,6 +129,11 @@ class TestOfflineContact:
|
|||||||
assert not contact1.is_blocked()
|
assert not contact1.is_blocked()
|
||||||
assert not contact1.is_verified()
|
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):
|
def test_get_contacts_and_delete(self, acfactory):
|
||||||
ac1 = acfactory.get_configured_offline_account()
|
ac1 = acfactory.get_configured_offline_account()
|
||||||
contact1 = ac1.create_contact("some1@example.org", name="some1")
|
contact1 = ac1.create_contact("some1@example.org", name="some1")
|
||||||
|
|||||||
Reference in New Issue
Block a user