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:
parent
0ba3c5629f
commit
9f79bb54b8
1 changed files with 24 additions and 0 deletions
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in a new issue