Fix duplicate heroes in `/sync` response.
This commit is contained in:
Till 2022-04-27 21:31:30 +02:00 committed by GitHub
parent 8d69e2f0b8
commit 74259f296f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -64,7 +64,7 @@ const selectMembershipCountSQL = "" +
") t WHERE t.membership = $3" ") t WHERE t.membership = $3"
const selectHeroesSQL = "" + const selectHeroesSQL = "" +
"SELECT user_id FROM syncapi_memberships WHERE room_id = $1 AND user_id != $2 AND membership = ANY($3) LIMIT 5" "SELECT DISTINCT user_id FROM syncapi_memberships WHERE room_id = $1 AND user_id != $2 AND membership = ANY($3) LIMIT 5"
type membershipsStatements struct { type membershipsStatements struct {
upsertMembershipStmt *sql.Stmt upsertMembershipStmt *sql.Stmt