mirror of
https://github.com/chatmail/core.git
synced 2026-04-19 14:36:29 +03:00
Split ForcePlaintext param into two booleans
This allows to send encrypted messages without Autocrypt header.
This commit is contained in:
committed by
link2xt
parent
6fcc589655
commit
f657b2950c
29
src/param.rs
29
src/param.rs
@@ -43,6 +43,9 @@ pub enum Param {
|
||||
/// For Messages: force unencrypted message, a value from `ForcePlaintext` enum.
|
||||
ForcePlaintext = b'u',
|
||||
|
||||
/// For Messages: do not include Autocrypt header.
|
||||
SkipAutocrypt = b'o',
|
||||
|
||||
/// For Messages
|
||||
WantsMdn = b'r',
|
||||
|
||||
@@ -127,32 +130,6 @@ pub enum Param {
|
||||
MsgId = b'I',
|
||||
}
|
||||
|
||||
/// Possible values for `Param::ForcePlaintext`.
|
||||
#[derive(PartialEq, Eq, Debug, Clone, Copy, FromPrimitive)]
|
||||
#[repr(u8)]
|
||||
pub enum ForcePlaintext {
|
||||
/// Do not force plaintext
|
||||
Dont = 0,
|
||||
|
||||
/// Force plaintext message with Autocrypt header
|
||||
///
|
||||
/// Used for `vc-request` and `vg-request` messages in
|
||||
/// Verified Contact Protocol and
|
||||
/// Verified Group Protocol.
|
||||
AddAutocryptHeader = 1,
|
||||
|
||||
/// Force plaintext message without Autocrypt header
|
||||
///
|
||||
/// Used for MDNs.
|
||||
NoAutocryptHeader = 2,
|
||||
}
|
||||
|
||||
impl Default for ForcePlaintext {
|
||||
fn default() -> Self {
|
||||
Self::Dont
|
||||
}
|
||||
}
|
||||
|
||||
/// An object for handling key=value parameter lists.
|
||||
///
|
||||
/// The structure is serialized by calling `to_string()` on it.
|
||||
|
||||
Reference in New Issue
Block a user