mirror of
https://github.com/chatmail/core.git
synced 2026-09-22 13:01:21 +03:00
feat!: remove a relay immediately instead of unpublishing it
Removing a relay now takes effect immediately: - the profile stops fetching and advertising it, - secondary devices immediately apply the removal through the transport sync, Upgrading removes unpublished relays and triggers keyupdates. BREAKING CHANGE: set_transport_unpublished() is removed: UIs call delete_transport() when the user removes a relay. BREAKING CHANGE: list_transports_ex() and the TransportListEntry type are removed: use list_transports(). BREAKING CHANGE: delete_transport() no longer refuses to remove the primary transport: it refuses only to remove the last one and re-elects the sending transport as needed. BREAKING CHANGE: TransportsModified is now also emitted on the device modifying the transports, not only on devices applying the synced change. Deprecated: DC_STR_PHASING_OUT
This commit is contained in:
@@ -733,9 +733,12 @@ pub(crate) async fn add_self_recipients(
|
||||
// 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.
|
||||
let from = context.get_primary_self_addr().await?;
|
||||
if encrypted {
|
||||
for addr in context.get_published_secondary_self_addrs().await? {
|
||||
recipients.push(addr);
|
||||
for addr in context.get_self_addrs().await? {
|
||||
if addr != from {
|
||||
recipients.push(addr);
|
||||
}
|
||||
}
|
||||
}
|
||||
// `from` must be the last addr
|
||||
@@ -744,7 +747,6 @@ pub(crate) async fn add_self_recipients(
|
||||
// This helps with marking messages as delivered
|
||||
// if the server is slow and we never get an `OK` response
|
||||
// before the connection times out.
|
||||
let from = context.get_primary_self_addr().await?;
|
||||
recipients.push(from);
|
||||
|
||||
Ok(())
|
||||
|
||||
Reference in New Issue
Block a user