fix: Only increment mindepth on state events

This commit is contained in:
timedout authored and Jade Ellis committed 2026-06-27 19:49:33 +01:00
1 parent b63eaa81d4
commit d2c183baeb
1 file changed
+1 -1
@@ -388,7 +388,7 @@ impl super::Service {
// Event has passed all auth/stateres checks
drop(state_lock);
if incoming_pdu.depth > min_depth {
if incoming_pdu.depth > min_depth && incoming_pdu.state_key().is_some() {
self.services
.metadata
.set_mindepth(room_id, incoming_pdu.depth.into());