firebase-admin-node
firebase-admin-node copied to clipboard
[FR] allow to abort using AbortSignal
Describe the solution you'd like
when sending push notifications using the messaging module, I would like to be able to pass AbortSignal so that I can abort the request with it
I found a few problems with this issue:
- I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.
- This issue does not seem to follow the issue template. Make sure you provide all the required information.
Hello @rluvaton , thanks for filing the feature request. I'd like to know more about the feature. My current understanding is:
- In sending a message you can attach AbortSignal being a string label you defined
- You can send another request with the same string label to cancel the previous send (assume if it hasn't reached out to the client yet)
Is my understanding correct? If so I think our backend cannot support it due to various reasons.
What I mean is that we should be able to pass to every API function here (e.g. sending push notification) an AbortSignal that will propagate to the request call (should be part of the options)
https://github.com/firebase/firebase-admin-node/blob/b7de8a1330f6a32c11a7dc590b6775fde45ebb39/src/utils/api-request.ts#L487