fix pubkey in postgres

This commit is contained in:
Yasuhiro Matsumoto
2024-02-22 09:33:14 +09:00
parent a86745ec5f
commit c082c99cdb
2 changed files with 3 additions and 3 deletions

View File

@@ -83,7 +83,7 @@ func (b PostgresBackend) queryEventsSql(filter nostr.Filter, doCount bool) (stri
for _, v := range filter.Authors {
params = append(params, v)
}
conditions = append(conditions, ` pubkey IN (`+makePlaceHolders(len(filter.IDs))+`)`)
conditions = append(conditions, ` pubkey IN (`+makePlaceHolders(len(filter.Authors))+`)`)
}
if len(filter.Kinds) > 0 {

View File

@@ -71,7 +71,7 @@ func (b SQLite3Backend) queryEventsSql(filter nostr.Filter, doCount bool) (strin
for _, v := range filter.IDs {
params = append(params, v)
}
conditions = append(conditions, ` id IN (`+makePlaceHolders(len(filter.IDs))+`)`)
conditions = append(conditions, `id IN (`+makePlaceHolders(len(filter.IDs))+`)`)
}
if len(filter.Authors) > 0 {
@@ -83,7 +83,7 @@ func (b SQLite3Backend) queryEventsSql(filter nostr.Filter, doCount bool) (strin
for _, v := range filter.Authors {
params = append(params, v)
}
conditions = append(conditions, ` pubkey IN (`+makePlaceHolders(len(filter.Authors))+`)`)
conditions = append(conditions, `pubkey IN (`+makePlaceHolders(len(filter.Authors))+`)`)
}
if len(filter.Kinds) > 0 {