mirror of
https://github.com/matrix-construct/construct
synced 2024-12-25 23:14:13 +01:00
ircd:Ⓜ️:event::conforms: Update event_id related conditions.
This commit is contained in:
parent
d37aaa8542
commit
aa78f6f85c
2 changed files with 5 additions and 2 deletions
|
@ -701,9 +701,13 @@ ircd::m::event::conforms::conforms(const event &e,
|
|||
ircd::m::event::conforms::conforms(const event &e)
|
||||
:report{0}
|
||||
{
|
||||
if(!valid(m::id::EVENT, json::get<"event_id"_>(e)))
|
||||
if(!e.event_id)
|
||||
set(INVALID_OR_MISSING_EVENT_ID);
|
||||
|
||||
if(defined(json::get<"event_id"_>(e)))
|
||||
if(!valid(m::id::EVENT, json::get<"event_id"_>(e)))
|
||||
set(INVALID_OR_MISSING_EVENT_ID);
|
||||
|
||||
if(!valid(m::id::ROOM, json::get<"room_id"_>(e)))
|
||||
set(INVALID_OR_MISSING_ROOM_ID);
|
||||
|
||||
|
|
|
@ -175,7 +175,6 @@ put__invite(client &client,
|
|||
|
||||
m::event::conforms non_conforms;
|
||||
non_conforms |= non_conforms.MISSING_PREV_STATE;
|
||||
non_conforms |= non_conforms.INVALID_OR_MISSING_EVENT_ID;
|
||||
const m::event::conforms report
|
||||
{
|
||||
event, non_conforms.report
|
||||
|
|
Loading…
Reference in a new issue