Describe the bug
In the leave_session database function, after someone removes their rsvp, we send a message to whoever is sitting in the last RSVP spot. This was done to handle notifying someone if they were just bumped into the spot, but since we don't check who was there prior, it is possible to send a message to someone who was already in the game.
The database function needs to be updated to consider who was in the spot prior, and only notify if the person changed.
To Reproduce
Steps to reproduce the behavior:
Go to '...'
Click on '....'
Scroll down to '....'
See error
Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
OS: [e.g. iOS]
Browser [e.g. chrome, safari]
Version [e.g. 22]
Smartphone (please complete the following information):
Device: [e.g. iPhone6]
OS: [e.g. iOS8.1]
Browser [e.g. stock browser, safari]
Version [e.g. 22]
Additional context
Add any other context about the problem here.
I applied an update to the database function to pull the current rsvp before removing the person leaving, and compare afterwards to determine if a notification should be sent.
Describe the bug In the leave_session database function, after someone removes their rsvp, we send a message to whoever is sitting in the last RSVP spot. This was done to handle notifying someone if they were just bumped into the spot, but since we don't check who was there prior, it is possible to send a message to someone who was already in the game.
The database function needs to be updated to consider who was in the spot prior, and only notify if the person changed.
To Reproduce Steps to reproduce the behavior:
Expected behavior A clear and concise description of what you expected to happen.
Screenshots If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
Smartphone (please complete the following information):
Additional context Add any other context about the problem here.