0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-06-25 21:38:18 +02:00

ircd:Ⓜ️:room::messages: Fix fetch() wrapping; pass any fopts.

This commit is contained in:
Jason Volk 2019-01-16 18:08:56 -08:00
parent 1b9e306ff0
commit 9e450cd912

View file

@ -835,7 +835,14 @@ const
const ircd::m::event &
ircd::m::room::messages::fetch()
{
m::seek(_event, event_idx());
const event::fetch::opts &fopts
{
room.fopts?
*room.fopts:
event::fetch::default_opts
};
m::seek(_event, event_idx(), fopts);
return _event;
}
@ -849,12 +856,7 @@ ircd::m::room::messages::fetch(std::nothrow_t)
event::fetch::default_opts
};
if(!m::seek(_event, event_idx(), std::nothrow))
_event = m::event::fetch
{
fopts
};
m::seek(_event, event_idx(), std::nothrow, fopts);
return _event;
}