ruma-events: Expose the content fields of the verification start event publicly.

This commit is contained in:
Damir Jelić 2020-07-14 16:36:49 +02:00 committed by Jonas Platte
parent c93cfb986b
commit 02d7f8d17b
No known key found for this signature in database
GPG Key ID: CC154DE0E30B7C67

View File

@ -27,36 +27,37 @@ pub enum StartEventContent {
/// The payload of an *m.key.verification.start* event using the *m.sas.v1* method.
#[derive(Clone, Debug, Deserialize, Serialize)]
#[non_exhaustive]
pub struct MSasV1Content {
/// The device ID which is initiating the process.
pub(crate) from_device: Box<DeviceId>,
pub from_device: Box<DeviceId>,
/// An opaque identifier for the verification process.
///
/// Must be unique with respect to the devices involved. Must be the same as the
/// `transaction_id` given in the *m.key.verification.request* if this process is originating
/// from a request.
pub(crate) transaction_id: String,
pub transaction_id: String,
/// The key agreement protocols the sending device understands.
///
/// Must include at least `curve25519`.
pub(crate) key_agreement_protocols: Vec<KeyAgreementProtocol>,
pub key_agreement_protocols: Vec<KeyAgreementProtocol>,
/// The hash methods the sending device understands.
///
/// Must include at least `sha256`.
pub(crate) hashes: Vec<HashAlgorithm>,
pub hashes: Vec<HashAlgorithm>,
/// The message authentication codes that the sending device understands.
///
/// Must include at least `hkdf-hmac-sha256`.
pub(crate) message_authentication_codes: Vec<MessageAuthenticationCode>,
pub message_authentication_codes: Vec<MessageAuthenticationCode>,
/// The SAS methods the sending device (and the sending device's user) understands.
///
/// Must include at least `decimal`. Optionally can include `emoji`.
pub(crate) short_authentication_string: Vec<ShortAuthenticationString>,
pub short_authentication_string: Vec<ShortAuthenticationString>,
}
/// Options for creating an `MSasV1Content` with `MSasV1Content::new`.