fix: Fix panic when creating rooms

This commit is contained in:
Ginger
2026-04-29 09:26:13 -04:00
parent 049babc7ca
commit 9491be928d
+5 -1
View File
@@ -201,6 +201,7 @@ where
drop(insert_lock); drop(insert_lock);
// See if the event matches any known pushers via power level // See if the event matches any known pushers via power level
if *pdu.kind() != TimelineEventType::RoomCreate {
let power_levels = self let power_levels = self
.services .services
.state_accessor .state_accessor
@@ -252,7 +253,9 @@ where
{ {
match action { match action {
| Action::Notify => notify = true, | Action::Notify => notify = true,
| Action::SetTweak(Tweak::Highlight(ruma::push::HighlightTweakValue::Yes)) => { | Action::SetTweak(Tweak::Highlight(
ruma::push::HighlightTweakValue::Yes,
)) => {
highlight = true; highlight = true;
}, },
| _ => {}, | _ => {},
@@ -286,6 +289,7 @@ where
self.db self.db
.increment_notification_counts(room_id, notifies, highlights); .increment_notification_counts(room_id, notifies, highlights);
}
match *pdu.kind() { match *pdu.kind() {
| TimelineEventType::RoomRedaction => { | TimelineEventType::RoomRedaction => {