mirror of
https://github.com/chatmail/core.git
synced 2026-04-25 01:16:29 +03:00
Merge tag 'v1.124.1'
This commit is contained in:
11
CHANGELOG.md
11
CHANGELOG.md
@@ -1,5 +1,15 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## [1.124.1] - 2023-10-05
|
||||||
|
|
||||||
|
### Fixes
|
||||||
|
|
||||||
|
- Remove footer from reactions on the receiver side ([#4780](https://github.com/deltachat/deltachat-core-rust/pull/4780)).
|
||||||
|
|
||||||
|
### CI
|
||||||
|
|
||||||
|
- Pin `urllib3` version to `<2`. ([#4788](https://github.com/deltachat/deltachat-core-rust/issues/4788))
|
||||||
|
|
||||||
## [1.124.0] - 2023-10-04
|
## [1.124.0] - 2023-10-04
|
||||||
|
|
||||||
### API-Changes
|
### API-Changes
|
||||||
@@ -2868,3 +2878,4 @@ https://github.com/deltachat/deltachat-core-rust/pulls?q=is%3Apr+is%3Aclosed
|
|||||||
[1.122.0]: https://github.com/deltachat/deltachat-core-rust/compare/v1.121.0...v1.122.0
|
[1.122.0]: https://github.com/deltachat/deltachat-core-rust/compare/v1.121.0...v1.122.0
|
||||||
[1.123.0]: https://github.com/deltachat/deltachat-core-rust/compare/v1.122.0...v1.123.0
|
[1.123.0]: https://github.com/deltachat/deltachat-core-rust/compare/v1.122.0...v1.123.0
|
||||||
[1.124.0]: https://github.com/deltachat/deltachat-core-rust/compare/v1.123.0...v1.124.0
|
[1.124.0]: https://github.com/deltachat/deltachat-core-rust/compare/v1.123.0...v1.124.0
|
||||||
|
[1.124.1]: https://github.com/deltachat/deltachat-core-rust/compare/v1.124.0...v1.124.1
|
||||||
|
|||||||
10
Cargo.lock
generated
10
Cargo.lock
generated
@@ -1085,7 +1085,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "deltachat"
|
name = "deltachat"
|
||||||
version = "1.124.0"
|
version = "1.124.1"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"ansi_term",
|
"ansi_term",
|
||||||
"anyhow",
|
"anyhow",
|
||||||
@@ -1162,7 +1162,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "deltachat-jsonrpc"
|
name = "deltachat-jsonrpc"
|
||||||
version = "1.124.0"
|
version = "1.124.1"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"async-channel",
|
"async-channel",
|
||||||
@@ -1186,7 +1186,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "deltachat-repl"
|
name = "deltachat-repl"
|
||||||
version = "1.124.0"
|
version = "1.124.1"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"ansi_term",
|
"ansi_term",
|
||||||
"anyhow",
|
"anyhow",
|
||||||
@@ -1201,7 +1201,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "deltachat-rpc-server"
|
name = "deltachat-rpc-server"
|
||||||
version = "1.124.0"
|
version = "1.124.1"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"deltachat",
|
"deltachat",
|
||||||
@@ -1226,7 +1226,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "deltachat_ffi"
|
name = "deltachat_ffi"
|
||||||
version = "1.124.0"
|
version = "1.124.1"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"deltachat",
|
"deltachat",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "deltachat"
|
name = "deltachat"
|
||||||
version = "1.124.0"
|
version = "1.124.1"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
license = "MPL-2.0"
|
license = "MPL-2.0"
|
||||||
rust-version = "1.67"
|
rust-version = "1.67"
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "deltachat_ffi"
|
name = "deltachat_ffi"
|
||||||
version = "1.124.0"
|
version = "1.124.1"
|
||||||
description = "Deltachat FFI"
|
description = "Deltachat FFI"
|
||||||
edition = "2018"
|
edition = "2018"
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "deltachat-jsonrpc"
|
name = "deltachat-jsonrpc"
|
||||||
version = "1.124.0"
|
version = "1.124.1"
|
||||||
description = "DeltaChat JSON-RPC API"
|
description = "DeltaChat JSON-RPC API"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
default-run = "deltachat-jsonrpc-server"
|
default-run = "deltachat-jsonrpc-server"
|
||||||
|
|||||||
@@ -55,5 +55,5 @@
|
|||||||
},
|
},
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"types": "dist/deltachat.d.ts",
|
"types": "dist/deltachat.d.ts",
|
||||||
"version": "1.124.0"
|
"version": "1.124.1"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "deltachat-repl"
|
name = "deltachat-repl"
|
||||||
version = "1.124.0"
|
version = "1.124.1"
|
||||||
license = "MPL-2.0"
|
license = "MPL-2.0"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "deltachat-rpc-server"
|
name = "deltachat-rpc-server"
|
||||||
version = "1.124.0"
|
version = "1.124.1"
|
||||||
description = "DeltaChat JSON-RPC server"
|
description = "DeltaChat JSON-RPC server"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
|
|||||||
@@ -60,5 +60,5 @@
|
|||||||
"test:mocha": "mocha -r esm node/test/test.js --growl --reporter=spec --bail --exit"
|
"test:mocha": "mocha -r esm node/test/test.js --growl --reporter=spec --bail --exit"
|
||||||
},
|
},
|
||||||
"types": "node/dist/index.d.ts",
|
"types": "node/dist/index.d.ts",
|
||||||
"version": "1.124.0"
|
"version": "1.124.1"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -25,6 +25,9 @@ deps =
|
|||||||
pytest-xdist
|
pytest-xdist
|
||||||
pdbpp
|
pdbpp
|
||||||
requests
|
requests
|
||||||
|
# urllib3 2.0 does not work in manylinux2014 containers.
|
||||||
|
# https://github.com/deltachat/deltachat-core-rust/issues/4788
|
||||||
|
urllib3<2
|
||||||
|
|
||||||
[testenv:.pkg]
|
[testenv:.pkg]
|
||||||
passenv =
|
passenv =
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
2023-10-04
|
2023-10-05
|
||||||
@@ -431,6 +431,32 @@ Content-Disposition: reaction\n\
|
|||||||
assert_eq!(bob_reaction.emojis(), vec!["👍"]);
|
assert_eq!(bob_reaction.emojis(), vec!["👍"]);
|
||||||
assert_eq!(bob_reaction.as_str(), "👍");
|
assert_eq!(bob_reaction.as_str(), "👍");
|
||||||
|
|
||||||
|
// Alice receives reaction to her message from Bob with a footer.
|
||||||
|
receive_imf(
|
||||||
|
&alice,
|
||||||
|
"To: alice@example.org\n\
|
||||||
|
From: bob@example.net\n\
|
||||||
|
Date: Today, 29 February 2021 00:00:10 -800\n\
|
||||||
|
Message-ID: 56790@example.net\n\
|
||||||
|
In-Reply-To: 12345@example.org\n\
|
||||||
|
Subject: Meeting\n\
|
||||||
|
Mime-Version: 1.0 (1.0)\n\
|
||||||
|
Content-Type: text/plain; charset=utf-8\n\
|
||||||
|
Content-Disposition: reaction\n\
|
||||||
|
\n\
|
||||||
|
😀\n\
|
||||||
|
\n\
|
||||||
|
--\n\
|
||||||
|
_______________________________________________\n\
|
||||||
|
Here's my footer -- bob@example.net"
|
||||||
|
.as_bytes(),
|
||||||
|
false,
|
||||||
|
)
|
||||||
|
.await?;
|
||||||
|
|
||||||
|
let reactions = get_msg_reactions(&alice, msg.id).await?;
|
||||||
|
assert_eq!(reactions.to_string(), "😀1");
|
||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -35,6 +35,7 @@ use crate::param::{Param, Params};
|
|||||||
use crate::peerstate::{Peerstate, PeerstateKeyType, PeerstateVerifiedStatus};
|
use crate::peerstate::{Peerstate, PeerstateKeyType, PeerstateVerifiedStatus};
|
||||||
use crate::reaction::{set_msg_reaction, Reaction};
|
use crate::reaction::{set_msg_reaction, Reaction};
|
||||||
use crate::securejoin::{self, handle_securejoin_handshake, observe_securejoin_on_other_device};
|
use crate::securejoin::{self, handle_securejoin_handshake, observe_securejoin_on_other_device};
|
||||||
|
use crate::simplify;
|
||||||
use crate::sql;
|
use crate::sql;
|
||||||
use crate::stock_str;
|
use crate::stock_str;
|
||||||
use crate::tools::{
|
use crate::tools::{
|
||||||
@@ -1119,12 +1120,13 @@ async fn add_parts(
|
|||||||
|
|
||||||
for part in &mut mime_parser.parts {
|
for part in &mut mime_parser.parts {
|
||||||
if part.is_reaction {
|
if part.is_reaction {
|
||||||
|
let reaction_str = simplify::remove_footers(part.msg.as_str());
|
||||||
set_msg_reaction(
|
set_msg_reaction(
|
||||||
context,
|
context,
|
||||||
&mime_in_reply_to,
|
&mime_in_reply_to,
|
||||||
orig_chat_id.unwrap_or_default(),
|
orig_chat_id.unwrap_or_default(),
|
||||||
from_id,
|
from_id,
|
||||||
Reaction::from(part.msg.as_str()),
|
Reaction::from(reaction_str.as_str()),
|
||||||
)
|
)
|
||||||
.await?;
|
.await?;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -67,6 +67,15 @@ fn remove_nonstandard_footer<'a>(lines: &'a [&str]) -> (&'a [&'a str], bool) {
|
|||||||
(lines, false)
|
(lines, false)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Remove footers if any.
|
||||||
|
/// This also makes all newlines "\n", but why not.
|
||||||
|
pub(crate) fn remove_footers(msg: &str) -> String {
|
||||||
|
let lines = split_lines(msg);
|
||||||
|
let lines = remove_message_footer(&lines).0;
|
||||||
|
let lines = remove_nonstandard_footer(lines).0;
|
||||||
|
lines.join("\n")
|
||||||
|
}
|
||||||
|
|
||||||
pub(crate) fn split_lines(buf: &str) -> Vec<&str> {
|
pub(crate) fn split_lines(buf: &str) -> Vec<&str> {
|
||||||
buf.split('\n').collect()
|
buf.split('\n').collect()
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user