Remove ToDeviceEventContent
… since any event can be sent using to-device messaging
This commit is contained in:
parent
6a0a10fcff
commit
1f2c186ce1
@ -4,8 +4,8 @@ use ruma_events_macros::Event;
|
|||||||
use ruma_identifiers::{EventId, RoomId, UserId};
|
use ruma_identifiers::{EventId, RoomId, UserId};
|
||||||
|
|
||||||
use crate::{
|
use crate::{
|
||||||
BasicEventContent, EphemeralRoomEventContent, MessageEventContent, StateEventContent,
|
BasicEventContent, EphemeralRoomEventContent, EventContent, MessageEventContent,
|
||||||
ToDeviceEventContent, UnsignedData,
|
StateEventContent, UnsignedData,
|
||||||
};
|
};
|
||||||
|
|
||||||
/// A basic event – one that consists only of it's type and the `content` object.
|
/// A basic event – one that consists only of it's type and the `content` object.
|
||||||
@ -79,7 +79,7 @@ pub struct StateEvent<C: StateEventContent> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, Debug, Event)]
|
#[derive(Clone, Debug, Event)]
|
||||||
pub struct ToDeviceEvent<C: ToDeviceEventContent> {
|
pub struct ToDeviceEvent<C: EventContent> {
|
||||||
/// Data specific to the event type.
|
/// Data specific to the event type.
|
||||||
pub content: C,
|
pub content: C,
|
||||||
|
|
||||||
|
@ -234,6 +234,3 @@ pub trait MessageEventContent: RoomEventContent {}
|
|||||||
|
|
||||||
/// Marker trait for the content of a state event.
|
/// Marker trait for the content of a state event.
|
||||||
pub trait StateEventContent: RoomEventContent {}
|
pub trait StateEventContent: RoomEventContent {}
|
||||||
|
|
||||||
/// Marker trait for event content types that are commonly sent using to-device messaging.
|
|
||||||
pub trait ToDeviceEventContent: EventContent {}
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user