Try that again

This commit is contained in:
Neil Alexander 2022-04-27 14:53:11 +01:00
parent 127bbceee1
commit 1b9084744c
No known key found for this signature in database
GPG key ID: A02A2019A2BB0944
2 changed files with 4 additions and 6 deletions

View file

@ -119,7 +119,6 @@ func (s *accountDataStatements) SelectAccountDataInRange(
var dataType string
var roomID string
var id types.StreamPosition
var highest types.StreamPosition
for rows.Next() {
if err = rows.Scan(&id, &roomID, &dataType); err != nil {
@ -131,8 +130,8 @@ func (s *accountDataStatements) SelectAccountDataInRange(
} else {
data[roomID] = []string{dataType}
}
if id > highest {
highest = id
if id > pos {
pos = id
}
}
if pos == 0 {

View file

@ -115,7 +115,6 @@ func (s *accountDataStatements) SelectAccountDataInRange(
var dataType string
var roomID string
var id types.StreamPosition
var highest types.StreamPosition
for rows.Next() {
if err = rows.Scan(&id, &roomID, &dataType); err != nil {
@ -127,8 +126,8 @@ func (s *accountDataStatements) SelectAccountDataInRange(
} else {
data[roomID] = []string{dataType}
}
if id > highest {
highest = id
if id > pos {
pos = id
}
}
if pos == 0 {