From 814281ed7d1b6700085e9544dcfac4274bc84cd6 Mon Sep 17 00:00:00 2001 From: Simon Laux Date: Sun, 8 Sep 2019 16:52:35 +0200 Subject: [PATCH] fixes #463 --- src/chat.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/chat.rs b/src/chat.rs index d7e55cb14..b409b15a1 100644 --- a/src/chat.rs +++ b/src/chat.rs @@ -1486,7 +1486,10 @@ pub unsafe fn remove_contact_from_chat( "bad chat_id = {} <= 9", chat_id ); - ensure!(contact_id != DC_CONTACT_ID_SELF, "Cannot remove self"); + ensure!( + contact_id > DC_CONTACT_ID_LAST_SPECIAL || contact_id == DC_CONTACT_ID_SELF, + "Cannot remove special contact" + ); let mut msg = dc_msg_new_untyped(context); let mut success = false;