mirror of
https://github.com/matrix-construct/construct
synced 2024-09-28 19:58:53 +02:00
ircd:Ⓜ️ Fix return value for index(event_id).
This commit is contained in:
parent
4b142de177
commit
cedfff720a
1 changed files with 9 additions and 1 deletions
|
@ -1412,12 +1412,20 @@ ircd::m::index(const event &event,
|
|||
ircd::m::event::idx
|
||||
ircd::m::index(const event::id &event_id)
|
||||
{
|
||||
if(!index(event_id, std::nothrow))
|
||||
const auto ret
|
||||
{
|
||||
index(event_id, std::nothrow)
|
||||
};
|
||||
|
||||
if(!ret)
|
||||
throw m::NOT_FOUND
|
||||
{
|
||||
"no index found for %s",
|
||||
string_view{event_id}
|
||||
|
||||
};
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
ircd::m::event::idx
|
||||
|
|
Loading…
Reference in a new issue