0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-11-26 08:42:34 +01:00

modules/console: Improve UX for room events with missing depth=0.

This commit is contained in:
Jason Volk 2019-02-11 11:06:11 -08:00
parent 1babba0e98
commit d2744f02c9

View file

@ -7687,9 +7687,10 @@ console_cmd__room__events(opt &out, const string_view &line)
room_id
};
m::room::messages it{room};
if(depth >= 0 && depth < std::numeric_limits<int64_t>::max())
it.seek(depth);
m::room::messages it
{
room, uint64_t(depth >= 0? depth : -1)
};
for(; it && limit >= 0; order == 'b'? --it : ++it, --limit)
if(roots)