0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-11-29 10:12:39 +01:00

ircd:Ⓜ️:event: Use better fault code for conforms hook failure.

This commit is contained in:
Jason Volk 2019-08-25 14:26:30 -07:00
parent c1e3b9f405
commit bbaec98d68

View file

@ -408,14 +408,14 @@ ircd::m::vm::conform_check_event_id
if(!event::id::v3::is(event.event_id))
throw error
{
fault::GENERAL, "Event ID %s is not sufficient for version 3 room.",
fault::INVALID, "Event ID %s is not sufficient for version 3 room.",
string_view{event.event_id}
};
if(!event::id::v4::is(event.event_id))
throw error
{
fault::GENERAL, "Event ID %s is not sufficient for version %s room",
fault::INVALID, "Event ID %s is not sufficient for version %s room",
string_view{event.event_id},
eval.room_version,
};
@ -438,7 +438,7 @@ ircd::m::vm::conform_check_origin
if(unlikely(eval.copts && !my_host(at<"origin"_>(event))))
throw error
{
fault::GENERAL, "Issuing event for origin: %s", at<"origin"_>(event)
fault::INVALID, "Issuing event for origin: %s", at<"origin"_>(event)
};
}
};