Fix handling of redactions of redactions #5788
When a redaction is redacted, we should strip out the content of the original redaction, including the "reason" field. Since 0f2ecb9, this has been broken. The challenge is to fix it in a way that does not reintroduce the bug which that commit fixed.
The approach taken here is to make sure we pull any redaction events we might need out of the database before we start turning any events into EventCacheEntries, so even a loop will be correctly handled.
The commits in this PR should be independently reviewable. It starts with a couple of refactors which (a) modify the interface to
The third commit adds the loop which recursively fetches redactions until we have found the ends of the redaction tree, and the fourth finally fixes the problem by passing all the fetched events into
@@ Coverage Diff @@ ## develop #5788 +/- ## =========================================== + Coverage 63.42% 63.44% +0.02% =========================================== Files 331 331 Lines 36519 36529 +10 Branches 6038 6038 =========================================== + Hits 23161 23176 +15 + Misses 11710 11708 -2 + Partials 1648 1645 -3