mirror of
https://github.com/hoernschen/dendrite.git
synced 2024-12-27 07:28:27 +00:00
Fix SQLite
This commit is contained in:
parent
5ef94156f5
commit
bd5eccb945
1 changed files with 6 additions and 3 deletions
|
@ -23,7 +23,6 @@ import (
|
|||
"sort"
|
||||
"strings"
|
||||
|
||||
"github.com/lib/pq"
|
||||
"github.com/matrix-org/dendrite/internal"
|
||||
"github.com/matrix-org/dendrite/internal/sqlutil"
|
||||
"github.com/matrix-org/dendrite/roomserver/storage/shared"
|
||||
|
@ -597,11 +596,15 @@ func (s *eventStatements) SelectEventAuthEventNIDs(
|
|||
result := make(map[types.EventNID][]types.EventNID)
|
||||
for rows.Next() {
|
||||
var eventNID types.EventNID
|
||||
var authEventNIDs pq.Int64Array
|
||||
var authEventNIDs string
|
||||
if err = rows.Scan(&authEventNIDs); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
for _, a := range authEventNIDs {
|
||||
var authEventNIDsArray []int64
|
||||
if err := json.Unmarshal([]byte(authEventNIDs), &authEventNIDsArray); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
for _, a := range authEventNIDsArray {
|
||||
result[eventNID] = append(result[eventNID], types.EventNID(a))
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue