mirror of
https://github.com/chatmail/core.git
synced 2026-05-03 21:36:29 +03:00
fix: Send bcc-self messages to all own relays (#7656)
This fixes the bug when a new transport doesn't become primary on the 2nd device because INBOX from the new transport isn't fully fetched. Now the `Transports` sync message is received from the old transport, but as it has updated "From", it updates the primary transport correspondingly. NB: I/O for the new primary transport isn't immediately started however, this needs a separate fix.
This commit is contained in:
@@ -2855,6 +2855,14 @@ pub(crate) async fn create_send_msg_jobs(context: &Context, msg: &mut Message) -
|
||||
|| msg.param.get_cmd() == SystemMessage::AutocryptSetupMessage)
|
||||
&& (context.get_config_delete_server_after().await? != Some(0) || !recipients.is_empty())
|
||||
{
|
||||
// Avoid sending unencrypted messages to all transports, chatmail relays won't accept
|
||||
// them. Normally the user should have a non-chatmail primary transport to send unencrypted
|
||||
// messages.
|
||||
if needs_encryption {
|
||||
for addr in context.get_secondary_self_addrs().await? {
|
||||
recipients.push(addr);
|
||||
}
|
||||
}
|
||||
recipients.push(from);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user