Skip to content

Commit b77c741

Browse files
committed
fix matching by sorting again
1 parent ef201e6 commit b77c741

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

frontend/src/components/MatchingService/MatchingForm.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,8 +125,11 @@ const MatchingForm = React.forwardRef(function MatchingForm() {
125125
const matchedUser = matchedUserPreferences.matchedUserPreferences;
126126
setIsMatching(false);
127127
const qId = await getQuestions(seed);
128-
const hashedEmailOne = sha256(userEmail || "");
129-
const hashedEmailTwo = sha256(matchedUser.userEmail);
128+
const emails = [userEmail, matchedUser.userEmail].sort();
129+
130+
// Hash the sorted emails
131+
const hashedEmailOne = sha256(emails[0]);
132+
const hashedEmailTwo = sha256(emails[1]);
130133
navigate(`/collab/question/${qId}/${hashedEmailOne}/${hashedEmailTwo}`);
131134
});
132135

0 commit comments

Comments
 (0)