mirror of
https://github.com/hoernschen/dendrite.git
synced 2024-12-27 07:28:27 +00:00
Fix for `sql: converting argument $1 type: unsupported type []interfa… (#2743)
…ce {}, a slice of interface` in new notifications select The sqlite3 version was just not working, original pr here: https://github.com/matrix-org/dendrite/pull/2688 signed off by: austin ellis <austin@hntlabs.com> This doesn't fix the notification counts, they still only work about 1 out of every 5 times in my tests. I will stick with my other fix locally for reliable notification delivery: https://github.com/matrix-org/dendrite/pull/2701
This commit is contained in:
parent
083ae01520
commit
a574ed5369
1 changed files with 2 additions and 2 deletions
|
@ -90,8 +90,8 @@ func (r *notificationDataStatements) SelectUserUnreadCountsForRooms(
|
||||||
for i := range roomIDs {
|
for i := range roomIDs {
|
||||||
params[i+1] = roomIDs[i]
|
params[i+1] = roomIDs[i]
|
||||||
}
|
}
|
||||||
sql := strings.Replace(selectUserUnreadNotificationsForRooms, "($1)", sqlutil.QueryVariadic(len(params)), 1)
|
sql := strings.Replace(selectUserUnreadNotificationsForRooms, "($2)", sqlutil.QueryVariadicOffset(len(roomIDs), 1), 1)
|
||||||
rows, err := r.db.QueryContext(ctx, sql, params)
|
rows, err := r.db.QueryContext(ctx, sql, params...)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue