Skip to content

Commit 779635d

Browse files
committed
refactor: deprecate Param::ErroneousE2ee
1 parent 2166412 commit 779635d

File tree

3 files changed

+3
-10
lines changed

3 files changed

+3
-10
lines changed

src/chat.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1991,9 +1991,6 @@ impl Chat {
19911991
.ok();
19921992
}
19931993

1994-
// reset encrypt error state eg. for forwarding
1995-
msg.param.remove(Param::ErroneousE2ee);
1996-
19971994
let is_bot = context.get_config_bool(Config::Bot).await?;
19981995
msg.param
19991996
.set_optional(Param::Bot, Some("1").filter(|_| is_bot));

src/message.rs

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -293,13 +293,7 @@ impl MsgId {
293293
ret += ", Location sent";
294294
}
295295

296-
let e2ee_errors = msg.param.get_int(Param::ErroneousE2ee).unwrap_or_default();
297-
298-
if 0 != e2ee_errors {
299-
if 0 != e2ee_errors & 0x2 {
300-
ret += ", Encrypted, no valid signature";
301-
}
302-
} else if 0 != msg.param.get_int(Param::GuaranteeE2ee).unwrap_or_default() {
296+
if 0 != msg.param.get_int(Param::GuaranteeE2ee).unwrap_or_default() {
303297
ret += ", Encrypted";
304298
}
305299

src/param.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,8 @@ pub enum Param {
5555

5656
/// For Messages: decrypted with validation errors or without mutual set, if neither
5757
/// 'c' nor 'e' are preset, the messages is only transport encrypted.
58+
///
59+
/// Deprecated on 2024-12-25.
5860
ErroneousE2ee = b'e',
5961

6062
/// For Messages: force unencrypted message, a value from `ForcePlaintext` enum.

0 commit comments

Comments
 (0)