mirror of
https://github.com/chatmail/core.git
synced 2026-04-28 19:06:35 +03:00
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:
committed by
holger krekel
parent
6fea6f730d
commit
8b5f7d98f6
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user