aboutsummaryrefslogtreecommitdiffstats
path: root/atuin-server-postgres/src
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--atuin-server-postgres/src/lib.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/atuin-server-postgres/src/lib.rs b/atuin-server-postgres/src/lib.rs
index 3b001bbb..9dc50312 100644
--- a/atuin-server-postgres/src/lib.rs
+++ b/atuin-server-postgres/src/lib.rs
@@ -437,7 +437,7 @@ impl Database for Postgres {
}
async fn tail_records(&self, user: &User) -> DbResult<RecordIndex> {
- const TAIL_RECORDS_SQL: &str = "select host, tag, client_id from records rp where (select count(1) from records where parent=rp.client_id and user_id = $1) = 0;";
+ const TAIL_RECORDS_SQL: &str = "select host, tag, client_id from records rp where (select count(1) from records where parent=rp.client_id and user_id = $1) = 0 and user_id = $1;";
let res = sqlx::query_as(TAIL_RECORDS_SQL)
.bind(user.id)