mirror of
https://github.com/matrix-construct/construct
synced 2024-06-03 02:28:55 +02:00
modules/console: Allow better remote host derivation from any alias argument in fed backfill.
This commit is contained in:
parent
47867d2b68
commit
406a893f80
|
@ -13795,15 +13795,22 @@ console_cmd__fed__backfill(opt &out, const string_view &line)
|
|||
"room_id", "remote", "count", "event_id", "op"
|
||||
}};
|
||||
|
||||
const auto &room_param
|
||||
{
|
||||
param.at("room_id")
|
||||
};
|
||||
|
||||
const auto &room_id
|
||||
{
|
||||
m::room_id(param.at("room_id"))
|
||||
m::room_id(room_param)
|
||||
};
|
||||
|
||||
const string_view remote
|
||||
{
|
||||
param["remote"] && !lex_castable<uint>(param["remote"])?
|
||||
param["remote"]:
|
||||
valid(m::id::ROOM_ALIAS, room_param)?
|
||||
m::room::alias{room_param}.host():
|
||||
room_id.host()
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue