feat: Allow leaving a 'Contact Request' group/channel

This commit is contained in:
Hocuri
2025-07-16 15:02:49 +02:00
parent aa452971a6
commit ce83952b4f
2 changed files with 5 additions and 2 deletions

View File

@@ -2907,7 +2907,11 @@ async fn prepare_send_msg(
CantSendReason::ContactRequest => {
// Allow securejoin messages, they are supposed to repair the verification.
// If the chat is a contact request, let the user accept it later.
msg.param.get_cmd() == SystemMessage::SecurejoinMessage
// And allow leaving a contact request chat.
matches!(
msg.param.get_cmd(),
SystemMessage::SecurejoinMessage | SystemMessage::MemberRemovedFromGroup
)
}
// Allow to send "Member removed" messages so we can leave the group/broadcast.
// Necessary checks should be made anyway before removing contact