core (pq): global flag only affects new connections; api to allow PQ in old contacts (#3869)

This commit is contained in:
spaced4ndy
2024-03-06 19:06:01 +04:00
committed by GitHub
parent 64dc758ffd
commit 61a3eb32ee
4 changed files with 36 additions and 17 deletions
+11
View File
@@ -245,6 +245,17 @@ createIncognitoProfile_ db userId createdAt Profile {displayName, fullName, imag
(displayName, fullName, image, userId, Just True, createdAt, createdAt)
insertedRowId db
allowConnEnablePQ :: DB.Connection -> Int64 -> IO ()
allowConnEnablePQ db connId =
DB.execute
db
[sql|
UPDATE connections
SET enable_pq = 1
WHERE connection_id = ?
|]
(Only connId)
updateConnPQSndEnabled :: DB.Connection -> Int64 -> PQFlag -> IO ()
updateConnPQSndEnabled db connId pqSndEnabled =
DB.execute