mirror of
https://github.com/matrix-construct/construct
synced 2025-02-16 16:50:12 +01:00
ircd:Ⓜ️:event::conforms: Fix event_id version regression in self-reference check.
This commit is contained in:
parent
07cdc73593
commit
45d9a79cc0
1 changed files with 5 additions and 15 deletions
|
@ -628,23 +628,13 @@ ircd::m::event::conforms::conforms(const event &e)
|
|||
const event::prev prev{e};
|
||||
if(json::get<"event_id"_>(e))
|
||||
{
|
||||
size_t i{0};
|
||||
for(const json::array &pe : json::get<"prev_events"_>(prev))
|
||||
{
|
||||
if(unquote(pe.at(0)) == json::get<"event_id"_>(e))
|
||||
set(SELF_PREV_EVENT);
|
||||
|
||||
++i;
|
||||
}
|
||||
|
||||
i = 0;
|
||||
for(const json::array &ps : json::get<"auth_events"_>(prev))
|
||||
{
|
||||
if(unquote(ps.at(0)) == json::get<"event_id"_>(e))
|
||||
for(size_t i(0); i < prev.auth_events_count(); ++i)
|
||||
if(prev.auth_event(i) == json::get<"event_id"_>(e))
|
||||
set(SELF_AUTH_EVENT);
|
||||
|
||||
++i;
|
||||
}
|
||||
for(size_t i(0); i < prev.prev_events_count(); ++i)
|
||||
if(prev.prev_event(i) == json::get<"event_id"_>(e))
|
||||
set(SELF_PREV_EVENT);
|
||||
}
|
||||
|
||||
for(size_t i(0); i < prev.auth_events_count(); ++i)
|
||||
|
|
Loading…
Add table
Reference in a new issue