0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-12-26 15:33:54 +01:00

ircd:Ⓜ️:fetch: Stub branch to make use of redacted_by.

This commit is contained in:
Jason Volk 2022-07-30 23:28:19 -07:00
parent 0ba3c5629f
commit 9f79bb54b8

View file

@ -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);