mirror of
https://github.com/matrix-org/dendrite.git
synced 2026-01-05 13:13:10 -06:00
Try that again
This commit is contained in:
parent
127bbceee1
commit
1b9084744c
|
|
@ -119,7 +119,6 @@ func (s *accountDataStatements) SelectAccountDataInRange(
|
||||||
var dataType string
|
var dataType string
|
||||||
var roomID string
|
var roomID string
|
||||||
var id types.StreamPosition
|
var id types.StreamPosition
|
||||||
var highest types.StreamPosition
|
|
||||||
|
|
||||||
for rows.Next() {
|
for rows.Next() {
|
||||||
if err = rows.Scan(&id, &roomID, &dataType); err != nil {
|
if err = rows.Scan(&id, &roomID, &dataType); err != nil {
|
||||||
|
|
@ -131,8 +130,8 @@ func (s *accountDataStatements) SelectAccountDataInRange(
|
||||||
} else {
|
} else {
|
||||||
data[roomID] = []string{dataType}
|
data[roomID] = []string{dataType}
|
||||||
}
|
}
|
||||||
if id > highest {
|
if id > pos {
|
||||||
highest = id
|
pos = id
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if pos == 0 {
|
if pos == 0 {
|
||||||
|
|
|
||||||
|
|
@ -115,7 +115,6 @@ func (s *accountDataStatements) SelectAccountDataInRange(
|
||||||
var dataType string
|
var dataType string
|
||||||
var roomID string
|
var roomID string
|
||||||
var id types.StreamPosition
|
var id types.StreamPosition
|
||||||
var highest types.StreamPosition
|
|
||||||
|
|
||||||
for rows.Next() {
|
for rows.Next() {
|
||||||
if err = rows.Scan(&id, &roomID, &dataType); err != nil {
|
if err = rows.Scan(&id, &roomID, &dataType); err != nil {
|
||||||
|
|
@ -127,8 +126,8 @@ func (s *accountDataStatements) SelectAccountDataInRange(
|
||||||
} else {
|
} else {
|
||||||
data[roomID] = []string{dataType}
|
data[roomID] = []string{dataType}
|
||||||
}
|
}
|
||||||
if id > highest {
|
if id > pos {
|
||||||
highest = id
|
pos = id
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if pos == 0 {
|
if pos == 0 {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue