mirror of
https://github.com/matrix-construct/construct
synced 2024-11-29 10:12:39 +01:00
ircd:Ⓜ️:event: Elide the query for empty event_id's for event exists.
This commit is contained in:
parent
dd49243224
commit
132f18327b
1 changed files with 2 additions and 2 deletions
|
@ -3776,7 +3776,7 @@ ircd::m::count(const event::prev &prev)
|
|||
bool
|
||||
ircd::m::good(const id::event &event_id)
|
||||
{
|
||||
return index(event_id, std::nothrow) != 0;
|
||||
return bool(event_id) && index(event_id, std::nothrow) != 0;
|
||||
}
|
||||
|
||||
bool
|
||||
|
@ -3796,7 +3796,7 @@ ircd::m::exists(const id::event &event_id)
|
|||
dbs::event_idx
|
||||
};
|
||||
|
||||
return has(column, event_id);
|
||||
return bool(event_id) && has(column, event_id);
|
||||
}
|
||||
|
||||
ircd::string_view
|
||||
|
|
Loading…
Reference in a new issue