events: Use Self alias in AnyMessageEventContent::relation
This commit is contained in:
parent
142f1800df
commit
02889b1fb4
@ -355,27 +355,27 @@ impl AnyMessageEventContent {
|
|||||||
match self {
|
match self {
|
||||||
#[cfg(feature = "unstable-pre-spec")]
|
#[cfg(feature = "unstable-pre-spec")]
|
||||||
#[rustfmt::skip]
|
#[rustfmt::skip]
|
||||||
AnyMessageEventContent::KeyVerificationReady(KeyVerificationReadyEventContent { relates_to, .. })
|
Self::KeyVerificationReady(KeyVerificationReadyEventContent { relates_to, .. })
|
||||||
| AnyMessageEventContent::KeyVerificationStart(KeyVerificationStartEventContent { relates_to, .. })
|
| Self::KeyVerificationStart(KeyVerificationStartEventContent { relates_to, .. })
|
||||||
| AnyMessageEventContent::KeyVerificationCancel(KeyVerificationCancelEventContent { relates_to, .. })
|
| Self::KeyVerificationCancel(KeyVerificationCancelEventContent { relates_to, .. })
|
||||||
| AnyMessageEventContent::KeyVerificationAccept(KeyVerificationAcceptEventContent { relates_to, .. })
|
| Self::KeyVerificationAccept(KeyVerificationAcceptEventContent { relates_to, .. })
|
||||||
| AnyMessageEventContent::KeyVerificationKey(KeyVerificationKeyEventContent { relates_to, .. })
|
| Self::KeyVerificationKey(KeyVerificationKeyEventContent { relates_to, .. })
|
||||||
| AnyMessageEventContent::KeyVerificationMac(KeyVerificationMacEventContent { relates_to, .. })
|
| Self::KeyVerificationMac(KeyVerificationMacEventContent { relates_to, .. })
|
||||||
| AnyMessageEventContent::KeyVerificationDone(KeyVerificationDoneEventContent { relates_to, .. }) => {
|
| Self::KeyVerificationDone(KeyVerificationDoneEventContent { relates_to, .. }) => {
|
||||||
Some(relates_to.clone().into())
|
Some(relates_to.clone().into())
|
||||||
},
|
},
|
||||||
#[cfg(feature = "unstable-pre-spec")]
|
#[cfg(feature = "unstable-pre-spec")]
|
||||||
AnyMessageEventContent::Reaction(ev) => Some(ev.relates_to.clone().into()),
|
Self::Reaction(ev) => Some(ev.relates_to.clone().into()),
|
||||||
AnyMessageEventContent::RoomEncrypted(ev) => ev.relates_to.clone(),
|
Self::RoomEncrypted(ev) => ev.relates_to.clone(),
|
||||||
AnyMessageEventContent::RoomMessage(ev) => ev.relates_to.clone().map(Into::into),
|
Self::RoomMessage(ev) => ev.relates_to.clone().map(Into::into),
|
||||||
AnyMessageEventContent::CallAnswer(_)
|
Self::CallAnswer(_)
|
||||||
| AnyMessageEventContent::CallInvite(_)
|
| Self::CallInvite(_)
|
||||||
| AnyMessageEventContent::CallHangup(_)
|
| Self::CallHangup(_)
|
||||||
| AnyMessageEventContent::CallCandidates(_)
|
| Self::CallCandidates(_)
|
||||||
| AnyMessageEventContent::RoomMessageFeedback(_)
|
| Self::RoomMessageFeedback(_)
|
||||||
| AnyMessageEventContent::RoomRedaction(_)
|
| Self::RoomRedaction(_)
|
||||||
| AnyMessageEventContent::Sticker(_)
|
| Self::Sticker(_)
|
||||||
| AnyMessageEventContent::_Custom { .. } => None,
|
| Self::_Custom { .. } => None,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user