fix read profiles

This commit is contained in:
leca 2024-08-17 06:02:16 +03:00
parent 2187609683
commit c64a1f1996
1 changed files with 1 additions and 1 deletions

View File

@ -138,7 +138,7 @@ export class User {
check_distance($6::double precision, $7::double precision, (SELECT lat FROM cities WHERE ID = location), (SELECT lng FROM cities WHERE ID = location), range)`
}
AND (interest = $4 OR interest = 'b')
AND NOT (room_id = ANY(ARRAY(SELECT recipient FROM read_profiles)))
AND NOT EXISTS(SELECT sender, recipient FROM read_profiles WHERE sender = $2 AND recipient = room_id)
ORDER BY RANDOM()
LIMIT 1`, [myage, this.roomId, myinterest, mysex, myrange, lat, lng])
).rows[0];