From 2c6588a807b1c2e85ac71a9a467eb89357d1075e Mon Sep 17 00:00:00 2001 From: Piotr Kozimor Date: Wed, 8 Sep 2021 12:18:05 +0200 Subject: [PATCH] Fix select sessions statements --- userapi/storage/threepid/stmt.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/userapi/storage/threepid/stmt.go b/userapi/storage/threepid/stmt.go index 4a660fcb6..02ff1c443 100644 --- a/userapi/storage/threepid/stmt.go +++ b/userapi/storage/threepid/stmt.go @@ -31,9 +31,9 @@ const ( "INSERT INTO threepid_sessions (sid, client_secret, threepid, token, next_link, send_attempt, validated_at_ts, validated)" + "VALUES ($1, $2, $3, $4, $5, $6, $7, $8)" selectSessionSQL = "" + - "SELECT client_secret, threepid, token, next_link, validated, validated_at_ts, send_attempt FROM threepid_sessions WHERE sid == $1" + "SELECT client_secret, threepid, token, next_link, validated, validated_at_ts, send_attempt FROM threepid_sessions WHERE sid = $1" selectSessionByThreePidAndCLientSecretSQL = "" + - "SELECT sid, token, next_link, validated, validated_at_ts, send_attempt FROM threepid_sessions WHERE threepid == $1 AND client_secret == $2" + "SELECT sid, token, next_link, validated, validated_at_ts, send_attempt FROM threepid_sessions WHERE threepid = $1 AND client_secret = $2" deleteSessionSQL = "" + "DELETE FROM threepid_sessions WHERE sid = $1" validateSessionSQL = "" +