From 5bf60df98b3bd308d45bb971d931cd6498515483 Mon Sep 17 00:00:00 2001 From: Jason Volk Date: Tue, 17 Sep 2019 19:09:02 -0700 Subject: [PATCH] ircd::m::event::apend: Skip the redacted query if event is room head. --- modules/m_event_append.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/m_event_append.cc b/modules/m_event_append.cc index 31ae29c13..b7b65a56d 100644 --- a/modules/m_event_append.cc +++ b/modules/m_event_append.cc @@ -140,7 +140,10 @@ ircd::m::event::append::append(json::stack::object &object, const bool query_redacted { - has_event_idx && opts.query_redacted && !is_state + has_event_idx && + opts.query_redacted && + !is_state && + (!opts.room_depth || *opts.room_depth > json::get<"depth"_>(event)) }; if(query_redacted && m::redacted(*opts.event_idx))