Skip to content

Commit a8e39cb

Browse files
committed
Unmerge match arms
1 parent ce70ef8 commit a8e39cb

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/chat.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2905,9 +2905,12 @@ async fn prepare_send_msg(
29052905
let mut chat = Chat::load_from_db(context, chat_id).await?;
29062906

29072907
let skip_fn = |reason: &CantSendReason| match reason {
2908-
CantSendReason::ProtectionBroken | CantSendReason::ContactRequest => {
2908+
CantSendReason::ProtectionBroken => {
29092909
// Allow securejoin messages, they are supposed to repair the verification.
2910-
// If the chat is a contact request, let the user accept it later.
2910+
msg.param.get_cmd() == SystemMessage::SecurejoinMessage
2911+
}
2912+
CantSendReason::ContactRequest => {
2913+
// If the chat is a contact request, allow securejoin messages and let the user accept it later.
29112914
// And allow leaving a contact request chat.
29122915
matches!(
29132916
msg.param.get_cmd(),

0 commit comments

Comments
 (0)