diff --git a/src/chat.rs b/src/chat.rs index 2112cc8f74..7d5686ba3e 100644 --- a/src/chat.rs +++ b/src/chat.rs @@ -3917,9 +3917,14 @@ pub(crate) async fn add_contact_to_chat_ex( chat.typ != Chattype::OutBroadcast || contact_id != ContactId::SELF, "Cannot add SELF to broadcast channel." ); + let is_encrypted = chat.is_encrypted(context).await?; ensure!( - chat.is_encrypted(context).await? == contact.is_key_contact(), - "Only key-contacts can be added to encrypted chats" + is_encrypted == contact.is_key_contact(), + if is_encrypted { + "Only key-contacts can be added to encrypted chats" + } else { + "Only address-contacts can be added to unencrypted chats" + } ); if !chat.is_self_in_chat(context).await? {