diff --git a/src/Utils.cpp b/src/Utils.cpp index 26e894b9..9001bd2d 100644 --- a/src/Utils.cpp +++ b/src/Utils.cpp @@ -1720,6 +1720,15 @@ utils::removeExpiredEvents() mtx::events::StateEvent>(e)) continue; + // synapse protects these 2 against redaction + if (std::holds_alternative< + mtx::events::StateEvent>(e)) + continue; + + if (std::holds_alternative< + mtx::events::StateEvent>(e)) + continue; + // skip events we don't know to protect us from mistakes. if (std::holds_alternative< mtx::events::RoomEvent>(e)) @@ -1746,7 +1755,7 @@ utils::removeExpiredEvents() .emplace(to_string(se.type), se.state_key) .second; else - return false; + return true; }, e)) continue;