mirror of
https://github.com/matrix-construct/construct
synced 2024-12-28 16:34:13 +01:00
modules/client/sync/rooms/state: Add fetch options w/ json request.
This commit is contained in:
parent
c4b17c293a
commit
c3dcd5f586
1 changed files with 11 additions and 6 deletions
|
@ -23,6 +23,8 @@ namespace ircd::m::sync
|
||||||
static void room_state_linear(data &);
|
static void room_state_linear(data &);
|
||||||
|
|
||||||
extern const event::keys::include _default_keys;
|
extern const event::keys::include _default_keys;
|
||||||
|
extern const event::fetch::opts _default_fopts;
|
||||||
|
|
||||||
extern item room_state;
|
extern item room_state;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -48,6 +50,14 @@ ircd::m::sync::_default_keys
|
||||||
"type",
|
"type",
|
||||||
};
|
};
|
||||||
|
|
||||||
|
decltype(ircd::m::sync::_default_fopts)
|
||||||
|
ircd::m::sync::_default_fopts{[]
|
||||||
|
{
|
||||||
|
event::fetch::opts ret{_default_keys};
|
||||||
|
ret.query_json_force = true;
|
||||||
|
return ret;
|
||||||
|
}()};
|
||||||
|
|
||||||
void
|
void
|
||||||
ircd::m::sync::room_state_linear(data &data)
|
ircd::m::sync::room_state_linear(data &data)
|
||||||
{
|
{
|
||||||
|
@ -87,14 +97,9 @@ ircd::m::sync::room_state_polylog_events(data &data)
|
||||||
const event::closure_idx each_idx{[&data, &array, &mutex]
|
const event::closure_idx each_idx{[&data, &array, &mutex]
|
||||||
(const m::event::idx &event_idx)
|
(const m::event::idx &event_idx)
|
||||||
{
|
{
|
||||||
static const m::event::fetch::opts fopts
|
|
||||||
{
|
|
||||||
_default_keys
|
|
||||||
};
|
|
||||||
|
|
||||||
const event::fetch event
|
const event::fetch event
|
||||||
{
|
{
|
||||||
event_idx, std::nothrow, fopts
|
event_idx, std::nothrow, _default_fopts
|
||||||
};
|
};
|
||||||
|
|
||||||
if(!event.valid)
|
if(!event.valid)
|
||||||
|
|
Loading…
Reference in a new issue