From a03e467cff79fe1c0738fc090fad544bbb0a4351 Mon Sep 17 00:00:00 2001 From: Jason Volk Date: Mon, 30 Apr 2018 22:49:29 -0700 Subject: [PATCH] modules/console: Fetch a head event id as default to feds backfill param. --- modules/console.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/console.cc b/modules/console.cc index 9fa6f1ada..b2f741504 100644 --- a/modules/console.cc +++ b/modules/console.cc @@ -3515,7 +3515,7 @@ console_cmd__feds__backfill(opt &out, const string_view &line) { const params param{line, " ", { - "room_id", "event_id", "[limit]" + "room_id", "[event_id]", "[limit]" }}; const auto &room_id @@ -3523,9 +3523,9 @@ console_cmd__feds__backfill(opt &out, const string_view &line) m::room_id(param.at(0)) }; - const m::event::id &event_id + const m::event::id::buf &event_id { - param.at(1) + param.count() > 1? param.at(1) : head(room_id) }; const size_t limit