fix: GET /api/matches sends a self-notification on every filter change - #376
Open
vedant7007 wants to merge 1 commit into
Open
fix: GET /api/matches sends a self-notification on every filter change#376vedant7007 wants to merge 1 commit into
vedant7007 wants to merge 1 commit into
Conversation
A read endpoint was creating a MATCH_FOUND notification on every cache miss, i.e. every distinct filter combination, spamming the searcher with notifications for their own searches. Remove the notification from the search path (and its now-unused import); new-match notifications belong on ticket creation/verification, not on the searcher's GET. Fixes TravellersMeet#369
|
Thanks for opening this PR, @vedant7007! 👋 Our maintainers will review it shortly. Estimate Time is 5-8 hrs .Meanwhile please:
If anything changes, feel free to push updates—this thread will stay open. |
This was referenced Aug 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #369
Problem
GET /api/matchescreated aMATCH_FOUNDnotification wheneverscoredMatches.length > 0. Because each distinct filter combination is a separate cache key (a fresh cache miss), a user adjusting filters received a "New traveller match found" notification for every one of their own searches.Fix
Removed the
createNotificationcall from the search path (and its now-unused import). Match notifications should be driven by ticket creation/verification, not by the searchers own GET.Testing
npx tsc --noEmitclean on the changed route.Contributing as part of Elite Coders Summer of Code (ECSoC 2026).