Explanation: The function pushToUids in src/notifications.js has a Cognitive Complexity of 20 due to too many nested asynchronous calls and conditional checks, so it needs to be refactored to reduce these and bring the complexity down to the allowed limit of 15.
File: src/notifications.js
Issue: Refactor this function to reduce its Cognitive Complexity from 20 to the 15 allowed.
Explanation: The function pushToUids in src/notifications.js has a Cognitive Complexity of 20 due to too many nested asynchronous calls and conditional checks, so it needs to be refactored to reduce these and bring the complexity down to the allowed limit of 15.