From 9f79bb54b827db08b4610dd0e7ed76ea4ade338e Mon Sep 17 00:00:00 2001 From: Jason Volk Date: Sat, 30 Jul 2022 23:28:19 -0700 Subject: [PATCH] ircd::m::fetch: Stub branch to make use of redacted_by. --- matrix/fetch.cc | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/matrix/fetch.cc b/matrix/fetch.cc index 84a0da4a3..97a1e41d1 100644 --- a/matrix/fetch.cc +++ b/matrix/fetch.cc @@ -982,6 +982,30 @@ ircd::m::fetch::_check_event(const request &request, && json::get<"origin"_>(event) == request.origin }; + if(mismatch_hashes && !authoritative_redaction) + { + const json::object _unsigned + { + event.source["unsigned"] + }; + + const json::string redacted_by + { + _unsigned["redacted_by"] + }; + + if(valid(id::EVENT, redacted_by)) + log::dwarning + { + log, "%s claims %s redacted by %s", + request.origin, + string_view{request.opts.event_id}, + redacted_by, + }; + + //TODO: XXX + } + if(authoritative_redaction || !mismatch_hashes) conforms.del(m::event::conforms::MISMATCH_HASHES);