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

ircd:Ⓜ️:room::messages: Add special case for ctor seeking depth=0.

This commit is contained in:
Jason Volk 2019-02-04 20:01:31 -08:00
parent f11282f583
commit a40a7912b0

View file

@ -709,7 +709,11 @@ ircd::m::room::messages::messages(const m::room &room,
event::fetch::default_opts
}
{
seek(depth);
// As a special convenience for the ctor only, if the depth=0 and
// nothing is found another attempt is made for depth=1 for synapse
// rooms which start at depth=1.
if(!seek(depth) && depth == 0)
seek(1);
}
const ircd::m::event &