OpenQDev/OpenQ-Frontend

Request Declined sends duplicate notification due to `declineRequest` and `rejectRequest` methods on FE

Closed this issue · 0 comments

I see in the frontend and Network tab that when i click Decline and it opens the modal, that's on updateRequest call that hits the API

Then when I write my message, we send a second updateRequest call with the message.

This causes the Knock client to send the notification twice.

Do we need to make this first call in order to create the rejection in the API? Can it be made into an upsert such that we only call updateRequest after the message is written?