From 9e10ddcc61fb00fd2242bee422bd722d3f907d58 Mon Sep 17 00:00:00 2001 From: Jason Volk Date: Thu, 11 Jul 2019 19:42:30 -0700 Subject: [PATCH] ircd::m::event: Improve construction event_id related conditions. --- ircd/m_event.cc | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/ircd/m_event.cc b/ircd/m_event.cc index edb7bf83e..886266fb6 100644 --- a/ircd/m_event.cc +++ b/ircd/m_event.cc @@ -4070,7 +4070,11 @@ ircd::m::event::event(const json::object &source, } ,event_id { - event_id + event_id? + event_id: + defined(json::get<"event_id"_>(*this))? + id{json::get<"event_id"_>(*this)}: + id{}, } ,source { @@ -4088,7 +4092,11 @@ ircd::m::event::event(const json::object &source, } ,event_id { - event_id + event_id? + event_id: + defined(json::get<"event_id"_>(*this))? + id{json::get<"event_id"_>(*this)}: + id{}, } ,source {