events: Add From<MessageType> for RoomMessageEventContentWithoutRelation
This commit is contained in:
parent
9cf1257142
commit
20d38e1622
@ -442,6 +442,12 @@ impl RoomMessageEventContentWithoutRelation {
|
||||
}
|
||||
}
|
||||
|
||||
impl From<MessageType> for RoomMessageEventContentWithoutRelation {
|
||||
fn from(msgtype: MessageType) -> Self {
|
||||
Self::new(msgtype)
|
||||
}
|
||||
}
|
||||
|
||||
impl From<RoomMessageEventContent> for RoomMessageEventContentWithoutRelation {
|
||||
fn from(value: RoomMessageEventContent) -> Self {
|
||||
let RoomMessageEventContent { msgtype, mentions, .. } = value;
|
||||
|
Loading…
x
Reference in New Issue
Block a user