0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-09-27 11:18:51 +02:00

modules/console: Allow count parameter to be specified without remote for fed backfill.

This commit is contained in:
Jason Volk 2020-04-22 23:45:27 -07:00
parent e2a6b268a4
commit 47867d2b68

View file

@ -13802,14 +13802,16 @@ console_cmd__fed__backfill(opt &out, const string_view &line)
const string_view remote
{
param["remote"]?
param["remote"] && !lex_castable<uint>(param["remote"])?
param["remote"]:
room_id.host()
};
const string_view &count
{
param.at("count", "32"_sv)
!lex_castable<uint>(param["remote"])?
param.at("count", "32"_sv):
param.at("remote")
};
string_view event_id
@ -13825,6 +13827,9 @@ console_cmd__fed__backfill(opt &out, const string_view &line)
if(!op && event_id == "eval")
std::swap(op, event_id);
else if(!event_id && !lex_castable<uint>(param["count"]))
op = param["count"];
// Used for out.head, out.content, in.head, but in.content is dynamic
const unique_mutable_buffer buf
{