From 7ea3cd5431358a51278cad006dec32010df3a9ec Mon Sep 17 00:00:00 2001 From: Liran Cohen Date: Thu, 9 Mar 2023 21:54:20 -0500 Subject: [PATCH] unecessary check --- storage/sqlite3/query.go | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/storage/sqlite3/query.go b/storage/sqlite3/query.go index 2744e29..9287c18 100644 --- a/storage/sqlite3/query.go +++ b/storage/sqlite3/query.go @@ -101,13 +101,11 @@ func (b SQLite3Backend) QueryEvents(filter *nostr.Filter) (events []nostr.Event, } } - if len(tagQuery) > 0 { - - // Naive implementation - for _, tagValue := range tagQuery { - params = append(params, "%"+tagValue+"%") - conditions = append(conditions, "tags LIKE ?") - } + // we use a very bad implementation in which we only check the tag values and + // ignore the tag names + for _, tagValue := range tagQuery { + params = append(params, "%"+tagValue+"%") + conditions = append(conditions, "tags LIKE ?") } if filter.Since != nil {