mirror of
https://github.com/matrix-construct/construct
synced 2024-11-29 18:22:50 +01:00
ircd:Ⓜ️:room::messages: Fix fetch() wrapping; pass any fopts.
This commit is contained in:
parent
1b9e306ff0
commit
9e450cd912
1 changed files with 9 additions and 7 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue