diff --git a/syncapi/storage/postgres/invites_table.go b/syncapi/storage/postgres/invites_table.go index 43b4f3735..aada70d5e 100644 --- a/syncapi/storage/postgres/invites_table.go +++ b/syncapi/storage/postgres/invites_table.go @@ -165,7 +165,7 @@ func (s *inviteEventsStatements) SelectInviteEventsInRange( } } if lastPos == 0 { - lastPos = r.From + lastPos = r.To } return result, retired, lastPos, rows.Err() } diff --git a/syncapi/storage/sqlite3/invites_table.go b/syncapi/storage/sqlite3/invites_table.go index 7d91ecd7e..e2dbcd5c8 100644 --- a/syncapi/storage/sqlite3/invites_table.go +++ b/syncapi/storage/sqlite3/invites_table.go @@ -176,7 +176,7 @@ func (s *inviteEventsStatements) SelectInviteEventsInRange( } } if lastPos == 0 { - lastPos = r.From + lastPos = r.To } return result, retired, lastPos, nil }