mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-25 20:48:52 +03:00
Prevent redactions of ACL and Create events, since Synapse prevents redaction of them anyway
This commit is contained in:
parent
146086332b
commit
6c180a5ca3
1 changed files with 10 additions and 1 deletions
|
@ -1720,6 +1720,15 @@ utils::removeExpiredEvents()
|
||||||
mtx::events::StateEvent<mtx::events::msg::Redacted>>(e))
|
mtx::events::StateEvent<mtx::events::msg::Redacted>>(e))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
// synapse protects these 2 against redaction
|
||||||
|
if (std::holds_alternative<
|
||||||
|
mtx::events::StateEvent<mtx::events::state::Create>>(e))
|
||||||
|
continue;
|
||||||
|
|
||||||
|
if (std::holds_alternative<
|
||||||
|
mtx::events::StateEvent<mtx::events::state::ServerAcl>>(e))
|
||||||
|
continue;
|
||||||
|
|
||||||
// skip events we don't know to protect us from mistakes.
|
// skip events we don't know to protect us from mistakes.
|
||||||
if (std::holds_alternative<
|
if (std::holds_alternative<
|
||||||
mtx::events::RoomEvent<mtx::events::Unknown>>(e))
|
mtx::events::RoomEvent<mtx::events::Unknown>>(e))
|
||||||
|
@ -1746,7 +1755,7 @@ utils::removeExpiredEvents()
|
||||||
.emplace(to_string(se.type), se.state_key)
|
.emplace(to_string(se.type), se.state_key)
|
||||||
.second;
|
.second;
|
||||||
else
|
else
|
||||||
return false;
|
return true;
|
||||||
},
|
},
|
||||||
e))
|
e))
|
||||||
continue;
|
continue;
|
||||||
|
|
Loading…
Reference in a new issue