mirror of
https://github.com/matrix-construct/construct
synced 2024-09-27 11:18:51 +02:00
ircd:Ⓜ️:room::messages: Support seeking to event index of 0 for begin.
This commit is contained in:
parent
26ee1c9b5c
commit
b15d3b929f
1 changed files with 7 additions and 6 deletions
|
@ -748,7 +748,8 @@ bool
|
|||
ircd::m::room::messages::seek_idx(const event::idx &event_idx)
|
||||
try
|
||||
{
|
||||
uint64_t depth;
|
||||
uint64_t depth(0);
|
||||
if(event_idx)
|
||||
m::get(event_idx, "depth", mutable_buffer
|
||||
{
|
||||
reinterpret_cast<char *>(&depth), sizeof(depth)
|
||||
|
@ -765,7 +766,7 @@ try
|
|||
return false;
|
||||
|
||||
// Check if this event_idx is actually in this room
|
||||
if(event_idx != this->event_idx())
|
||||
if(event_idx && event_idx != this->event_idx())
|
||||
return false;
|
||||
|
||||
return true;
|
||||
|
|
Loading…
Reference in a new issue