mirror of
https://github.com/matrix-construct/construct
synced 2024-12-28 00:14:07 +01:00
modules/client/rooms/join: Add conf item for initial backfill amount.
This commit is contained in:
parent
5994a0820d
commit
a20a11722d
1 changed files with 15 additions and 0 deletions
|
@ -177,6 +177,20 @@ backfill_timeout
|
||||||
{ "default", 15L },
|
{ "default", 15L },
|
||||||
};
|
};
|
||||||
|
|
||||||
|
conf::item<size_t>
|
||||||
|
backfill_limit
|
||||||
|
{
|
||||||
|
{ "name", "ircd.client.rooms.join.backfill.limit" },
|
||||||
|
{ "default", 64L },
|
||||||
|
{ "description",
|
||||||
|
|
||||||
|
R"(
|
||||||
|
The number of events to request on initial backfill. Specapse may limit
|
||||||
|
this to 50, but it also may not. Either way, a good choice is enough to
|
||||||
|
fill a client's timeline quickly with a little headroom.
|
||||||
|
)"}
|
||||||
|
};
|
||||||
|
|
||||||
event::id::buf
|
event::id::buf
|
||||||
bootstrap(const net::hostport &host,
|
bootstrap(const net::hostport &host,
|
||||||
const m::room::id &room_id,
|
const m::room::id &room_id,
|
||||||
|
@ -254,6 +268,7 @@ try
|
||||||
m::v1::backfill::opts opts{host};
|
m::v1::backfill::opts opts{host};
|
||||||
opts.dynamic = true;
|
opts.dynamic = true;
|
||||||
opts.event_id = event_id;
|
opts.event_id = event_id;
|
||||||
|
opts.limit = size_t(backfill_limit);
|
||||||
m::v1::backfill request
|
m::v1::backfill request
|
||||||
{
|
{
|
||||||
room_id, buf, std::move(opts)
|
room_id, buf, std::move(opts)
|
||||||
|
|
Loading…
Reference in a new issue