From 4fed875107365bd4abda5fb3399babf87f3fb456 Mon Sep 17 00:00:00 2001 From: "B. Petersen" Date: Wed, 30 Oct 2019 13:03:24 +0100 Subject: [PATCH] do not escalate attemt to add self to a group to the user, just return false from add_contact_to_chat() --- src/chat.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/chat.rs b/src/chat.rs index 9f5ce4663..f9f99b8da 100644 --- a/src/chat.rs +++ b/src/chat.rs @@ -1436,7 +1436,11 @@ pub(crate) fn add_contact_to_chat_ex( if contact.get_addr() == &self_addr { // ourself is added using DC_CONTACT_ID_SELF, do not add this address explicitly. // if SELF is not in the group, members cannot be added at all. - bail!("invalid attempt to add self e-mail address to group"); + warn!( + context, + "invalid attempt to add self e-mail address to group" + ); + return Ok(false); } if is_contact_in_chat(context, chat_id, contact_id) {