Merge branch 'stable-1.112' into 'master'

This commit is contained in:
link2xt
2023-04-04 15:01:37 +00:00
12 changed files with 45 additions and 16 deletions

View File

@@ -12,6 +12,16 @@
- Fix python bindings README documentation on installing the bindings from source.
- Show a warning if quota list is empty #4261
## [1.112.6] - 2023-04-04
### Changes
- Add a device message after backup transfer #4301
### Fixed
- Updated `iroh` from 0.4.0 to 0.4.1 to fix transfer of large accounts with many blob files.
## [1.112.5] - 2023-04-02
### Fixes
@@ -32,8 +42,8 @@
### Changes
- Update iroh, remove `default-net` from `[patch.crates-io]` section.
- transfer backup: Connect to mutliple provider addresses concurrently. This should speed up connection time significantly on the getter side. #4240
- Make sure BackupProvider is cancelled on drop (or dc_backup_provider_unref). The BackupProvider will now alaway finish with an IMEX event of 1000 or 0, previoulsy it would sometimes finishe with 1000 (success) when it really was 0 (failure). #4242
- transfer backup: Connect to multiple provider addresses concurrently. This should speed up connection time significantly on the getter side. #4240
- Make sure BackupProvider is cancelled on drop (or `dc_backup_provider_unref`). The BackupProvider will now always finish with an IMEX event of 1000 or 0, previously it would sometimes finished with 1000 (success) when it really was 0 (failure). #4242
### Fixes
- Do not return media from trashed messages in the "All media" view. #4247

10
Cargo.lock generated
View File

@@ -1157,7 +1157,7 @@ dependencies = [
[[package]]
name = "deltachat"
version = "1.112.5"
version = "1.112.6"
dependencies = [
"ansi_term",
"anyhow",
@@ -1231,7 +1231,7 @@ dependencies = [
[[package]]
name = "deltachat-jsonrpc"
version = "1.112.5"
version = "1.112.6"
dependencies = [
"anyhow",
"async-channel",
@@ -1254,7 +1254,7 @@ dependencies = [
[[package]]
name = "deltachat-repl"
version = "1.112.5"
version = "1.112.6"
dependencies = [
"ansi_term",
"anyhow",
@@ -1269,7 +1269,7 @@ dependencies = [
[[package]]
name = "deltachat-rpc-server"
version = "1.112.5"
version = "1.112.6"
dependencies = [
"anyhow",
"deltachat",
@@ -1293,7 +1293,7 @@ dependencies = [
[[package]]
name = "deltachat_ffi"
version = "1.112.5"
version = "1.112.6"
dependencies = [
"anyhow",
"deltachat",

View File

@@ -1,6 +1,6 @@
[package]
name = "deltachat"
version = "1.112.5"
version = "1.112.6"
edition = "2021"
license = "MPL-2.0"
rust-version = "1.65"

View File

@@ -1,6 +1,6 @@
[package]
name = "deltachat_ffi"
version = "1.112.5"
version = "1.112.6"
description = "Deltachat FFI"
edition = "2018"
readme = "README.md"

View File

@@ -7069,6 +7069,11 @@ void dc_event_unref(dc_event_t* event);
/// `%1$s` will be replaced by name and address of the account.
#define DC_STR_BACKUP_TRANSFER_QR 162
/// "Account transferred to your second device."
///
/// Used as a device message after a successful backup transfer.
#define DC_STR_BACKUP_TRANSFER_MSG_BODY 163
/**
* @}
*/

View File

@@ -1,6 +1,6 @@
[package]
name = "deltachat-jsonrpc"
version = "1.112.5"
version = "1.112.6"
description = "DeltaChat JSON-RPC API"
edition = "2021"
default-run = "deltachat-jsonrpc-server"

View File

@@ -55,5 +55,5 @@
},
"type": "module",
"types": "dist/deltachat.d.ts",
"version": "1.112.5"
"version": "1.112.6"
}

View File

@@ -1,6 +1,6 @@
[package]
name = "deltachat-repl"
version = "1.112.5"
version = "1.112.6"
license = "MPL-2.0"
edition = "2021"

View File

@@ -1,6 +1,6 @@
[package]
name = "deltachat-rpc-server"
version = "1.112.5"
version = "1.112.6"
description = "DeltaChat JSON-RPC server"
edition = "2021"
readme = "README.md"

View File

@@ -60,5 +60,5 @@
"test:mocha": "mocha -r esm node/test/test.js --growl --reporter=spec --bail --exit"
},
"types": "node/dist/index.d.ts",
"version": "1.112.5"
"version": "1.112.6"
}

View File

@@ -47,9 +47,11 @@ use tokio_stream::wrappers::ReadDirStream;
use tokio_util::sync::CancellationToken;
use crate::blob::BlobDirContents;
use crate::chat::delete_and_reset_all_device_msgs;
use crate::chat::{add_device_msg, delete_and_reset_all_device_msgs};
use crate::context::Context;
use crate::message::{Message, Viewtype};
use crate::qr::Qr;
use crate::stock_str::backup_transfer_msg_body;
use crate::{e2ee, EventType};
use super::{export_database, DBFILE_BACKUP_NAME};
@@ -270,7 +272,12 @@ impl BackupProvider {
}
};
match &res {
Ok(_) => context.emit_event(SendProgress::Completed.into()),
Ok(_) => {
context.emit_event(SendProgress::Completed.into());
let mut msg = Message::new(Viewtype::Text);
msg.text = Some(backup_transfer_msg_body(context).await);
add_device_msg(context, None, Some(&mut msg)).await?;
}
Err(err) => {
error!(context, "Backup transfer failure: {err:#}");
context.emit_event(SendProgress::Failed.into())

View File

@@ -407,6 +407,9 @@ pub enum StockMessage {
#[strum(props(fallback = "Scan to set up second device for %1$s"))]
BackupTransferQr = 162,
#[strum(props(fallback = " Account transferred to your second device."))]
BackupTransferMsgBody = 163,
}
impl StockMessage {
@@ -1261,6 +1264,10 @@ pub(crate) async fn backup_transfer_qr(context: &Context) -> Result<String> {
.replace1(&full_name))
}
pub(crate) async fn backup_transfer_msg_body(context: &Context) -> String {
translated(context, StockMessage::BackupTransferMsgBody).await
}
impl Context {
/// Set the stock string for the [StockMessage].
///