ruma_macros/events/
util.rs

1
2
3
4
5
6
7
8
9
10
11
12
use super::event_parse::{EventKind, EventKindVariation};

pub(crate) fn is_non_stripped_room_event(kind: EventKind, var: EventKindVariation) -> bool {
    matches!(kind, EventKind::MessageLike | EventKind::State)
        && matches!(
            var,
            EventKindVariation::Original
                | EventKindVariation::OriginalSync
                | EventKindVariation::Redacted
                | EventKindVariation::RedactedSync
        )
}