0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-11-29 18:22:50 +01:00

ircd:Ⓜ️:event::fetch: Fix condition here.

This commit is contained in:
Jason Volk 2019-07-21 17:01:10 -07:00
parent 62f861c54a
commit b7b329a130

View file

@ -1336,7 +1336,10 @@ ircd::m::seek(event::fetch &fetch,
std::nothrow_t) std::nothrow_t)
{ {
fetch.event_idx = event_idx; fetch.event_idx = event_idx;
fetch.event_id_buf = event_id; fetch.event_id_buf = event_id?
event::id::buf{event_id}:
event::id::buf{};
const string_view &key const string_view &key
{ {
byte_view<string_view>(event_idx) byte_view<string_view>(event_idx)
@ -1564,8 +1567,8 @@ ircd::m::event::fetch::assign_from_row(const string_view &key)
assign(event, row, key); assign(event, row, key);
const auto event_id const auto event_id
{ {
defined(json::get<"event_id"_>(*this))? !empty(json::get<"event_id"_>(event))?
id{json::get<"event_id"_>(*this)}: id{json::get<"event_id"_>(event)}:
event_id_buf? event_id_buf?
id{event_id_buf}: id{event_id_buf}:
m::event_id(event_idx, event_id_buf, std::nothrow) m::event_id(event_idx, event_id_buf, std::nothrow)