acmutd / acmutd/meteormate-backend
feat: endpoint for mutual likes
- Dominant language
- Python
- Stars
- 0
- Forks
- 0
- Avg merge
- 35m
- Merged PRs (30d)
- 2
Description
## PROBLEM
Currently, when a user likes another profile, there is no complete way to determine and return whether the like resulted in a mutual match. There is also no dedicated functionality for retrieving all mutual matches to display on the Matches page.
Additionally, users who have match notifications enabled should be notified when a new mutual match occurs.
## SOLUTION
Update the existing like functionality to detect when a mutual match occurs and add backend support for retrieving all of a user’s mutual matches.
A mutual match occurs when two users have liked each other’s profiles.
## Implementation
When a user likes another profile, check whether that person has already liked them back.
If both users have liked each other:
Identify the interaction as a mutual match.
Return a response indicating that a match occurred so the frontend can display the appropriate match/confetti UI
Add functionality to retrieve all mutual matches for the current user.
Only return profiles where both users have liked each other.
Include the profile information required to populate the Matches page.
When a new mutual match occurs, check the user’s match notification preferences.
If match notifications are enabled, send an email notification letting the user know they have a new match.
Make sure notifications are only sent when a new match is created, not repeatedly for an existing match.
## Expected Flow
User likes profile → Check if they liked the user back → Mutual match created → Return match status → Send email notification if enabled
The Matches page can then use the mutual match data to display all confirmed matches dynamically.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.