Fix query

This commit is contained in:
Till Faelligen 2022-02-21 16:57:24 +01:00
parent 0ae8293abd
commit c65eb2bf52
2 changed files with 2 additions and 2 deletions

View file

@ -300,7 +300,7 @@ func (s *membershipStatements) SelectRoomsWithMembership(
stmt := sqlutil.TxStmt(txn, s.selectRoomsForUserStmt) stmt := sqlutil.TxStmt(txn, s.selectRoomsForUserStmt)
rows, err = stmt.QueryContext(ctx, userID) rows, err = stmt.QueryContext(ctx, userID)
} else { } else {
stmt := sqlutil.TxStmt(txn, s.selectMembershipsFromRoomStmt) stmt := sqlutil.TxStmt(txn, s.selectRoomsWithMembershipStmt)
rows, err = stmt.QueryContext(ctx, membershipState, userID) rows, err = stmt.QueryContext(ctx, membershipState, userID)
} }

View file

@ -277,7 +277,7 @@ func (s *membershipStatements) SelectRoomsWithMembership(
stmt := sqlutil.TxStmt(txn, s.selectRoomsForUserStmt) stmt := sqlutil.TxStmt(txn, s.selectRoomsForUserStmt)
rows, err = stmt.QueryContext(ctx, userID) rows, err = stmt.QueryContext(ctx, userID)
} else { } else {
stmt := sqlutil.TxStmt(txn, s.selectMembershipsFromRoomStmt) stmt := sqlutil.TxStmt(txn, s.selectRoomsWithMembershipStmt)
rows, err = stmt.QueryContext(ctx, membershipState, userID) rows, err = stmt.QueryContext(ctx, membershipState, userID)
} }