Change EncryptedEventContent from StateEventContent to MessageEventContent
… and add it to AnyMessageEventContent
This commit is contained in:
parent
9f93d20a34
commit
be0838e7d3
@ -41,6 +41,7 @@ event_content_enum! {
|
|||||||
"m.call.invite",
|
"m.call.invite",
|
||||||
"m.call.hangup",
|
"m.call.hangup",
|
||||||
"m.call.candidates",
|
"m.call.candidates",
|
||||||
|
"m.room.encrypted",
|
||||||
"m.room.message",
|
"m.room.message",
|
||||||
"m.room.message.feedback",
|
"m.room.message.feedback",
|
||||||
"m.sticker",
|
"m.sticker",
|
||||||
|
@ -3,17 +3,17 @@
|
|||||||
use std::collections::BTreeMap;
|
use std::collections::BTreeMap;
|
||||||
|
|
||||||
use js_int::UInt;
|
use js_int::UInt;
|
||||||
use ruma_events_macros::StateEventContent;
|
use ruma_events_macros::MessageEventContent;
|
||||||
use ruma_identifiers::DeviceId;
|
use ruma_identifiers::DeviceId;
|
||||||
use serde::{Deserialize, Serialize};
|
use serde::{Deserialize, Serialize};
|
||||||
|
|
||||||
use crate::StateEvent;
|
use crate::MessageEvent;
|
||||||
|
|
||||||
/// An event that defines how messages sent in this room should be encrypted.
|
/// An event that defines how messages sent in this room should be encrypted.
|
||||||
pub type EncryptedEvent = StateEvent<EncryptedEventContent>;
|
pub type EncryptedEvent = MessageEvent<EncryptedEventContent>;
|
||||||
|
|
||||||
/// The payload for `EncryptedEvent`.
|
/// The payload for `EncryptedEvent`.
|
||||||
#[derive(Clone, Debug, Deserialize, Serialize, StateEventContent)]
|
#[derive(Clone, Debug, Deserialize, Serialize, MessageEventContent)]
|
||||||
#[non_exhaustive]
|
#[non_exhaustive]
|
||||||
#[ruma_event(type = "m.room.encrypted")]
|
#[ruma_event(type = "m.room.encrypted")]
|
||||||
#[serde(tag = "algorithm")]
|
#[serde(tag = "algorithm")]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user