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

ircd:Ⓜ️ Elaborate room::state ctor for easier custom fopts.

This commit is contained in:
Jason Volk 2018-05-20 20:14:44 -07:00
parent 6e7d5aec3b
commit a66928572b
2 changed files with 12 additions and 2 deletions

View file

@ -280,7 +280,8 @@ struct ircd::m::room::state
event::id::buf get(std::nothrow_t, const string_view &type, const string_view &state_key = "") const;
event::id::buf get(const string_view &type, const string_view &state_key = "") const;
state(const m::room &);
state(const m::room &room, const event::fetch::opts *const &fopts);
state(const m::room &room);
state() = default;
state(const state &) = delete;
state &operator=(const state &) = delete;

View file

@ -570,6 +570,15 @@ ircd::m::room::messages::fetch(std::nothrow_t)
//
ircd::m::room::state::state(const m::room &room)
:state
{
room, room.fopts
}
{
}
ircd::m::room::state::state(const m::room &room,
const event::fetch::opts *const &fopts)
:room_id
{
room.room_id
@ -588,7 +597,7 @@ ircd::m::room::state::state(const m::room &room)
}
,fopts
{
room.fopts
fopts
}
{
}