From bbaec98d686f2873cea737c1ceed9b4a8d342e33 Mon Sep 17 00:00:00 2001 From: Jason Volk Date: Sun, 25 Aug 2019 14:26:30 -0700 Subject: [PATCH] ircd::m::event: Use better fault code for conforms hook failure. --- ircd/m_event.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ircd/m_event.cc b/ircd/m_event.cc index 1003d290e..2f1dd4d3d 100644 --- a/ircd/m_event.cc +++ b/ircd/m_event.cc @@ -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) }; } };