do not escalate attemt to add self to a group to the user, just return false from add_contact_to_chat()

This commit is contained in:
B. Petersen
2019-10-30 13:03:24 +01:00
parent 501a6eee69
commit 4fed875107

View File

@@ -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) {