summary refs log tree commit diff
path: root/litterbox.c
diff options
context:
space:
mode:
Diffstat (limited to 'litterbox.c')
-rw-r--r--litterbox.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/litterbox.c b/litterbox.c
index af531ff..2ab2bf1 100644
--- a/litterbox.c
+++ b/litterbox.c
@@ -219,8 +219,8 @@ static void querySearch(struct Message *msg) {
 				highlight(search, 6, :bold, :bold),
 				events.event
 			FROM events
-			JOIN contexts ON contexts.context = events.context
-			JOIN names ON names.name = events.name
+			JOIN contexts USING (context)
+			JOIN names USING (name)
 			JOIN search ON search.rowid = events.event
 			WHERE contexts.network = :network
 				AND coalesce(contexts.query = :query, true)