@@ -58,7 +58,11 @@ fn matches_sender(&self, filter: &RoomEventFilter) -> bool {
|
||||
#[implement(super::Pdu)]
|
||||
fn matches_type(&self, filter: &RoomEventFilter) -> bool {
|
||||
let event_type = &self.kind.to_cow_str();
|
||||
if filter.not_types.iter().any(is_equal_to!(event_type)) {
|
||||
if filter
|
||||
.not_types
|
||||
.iter()
|
||||
.any(is_equal_to!(event_type))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -97,7 +97,11 @@ impl From<Id> for RawId {
|
||||
match id.shorteventid {
|
||||
| Count::Normal(shorteventid) => {
|
||||
vec.extend(shorteventid.to_be_bytes());
|
||||
Self::Normal(vec.as_ref().try_into().expect("RawVec into RawId::Normal"))
|
||||
Self::Normal(
|
||||
vec.as_ref()
|
||||
.try_into()
|
||||
.expect("RawVec into RawId::Normal"),
|
||||
)
|
||||
},
|
||||
| Count::Backfilled(shorteventid) => {
|
||||
vec.extend(0_u64.to_be_bytes());
|
||||
|
||||
@@ -102,7 +102,8 @@ where
|
||||
#[implement(Pdu)]
|
||||
#[must_use]
|
||||
pub fn get_unsigned_as_value(&self) -> JsonValue {
|
||||
self.get_unsigned::<JsonValue>().unwrap_or_default()
|
||||
self.get_unsigned::<JsonValue>()
|
||||
.unwrap_or_default()
|
||||
}
|
||||
|
||||
#[implement(Pdu)]
|
||||
|
||||
Reference in New Issue
Block a user