Given a list of notification data, return a new list of notification data that has only one notification per user.
If you encounter multiple notifications for the same user, keep the notification that has the higher priority in this list of notification types.
- Check Message
- Rate Match
- Edit Profile
- Check Match
If two notifications for the same user have the same type, keep the one that came first in the list order.
Input: List of NotificationInfo
Output: List of NotificationInfo
Create a new function in the existing file pipeline/utils/notifications.py for your implementation and add tests for it in the corresponding test file.
Given a list of notification data, return a new list of notification data that has only one notification per user.
If you encounter multiple notifications for the same user, keep the notification that has the higher priority in this list of notification types.
If two notifications for the same user have the same type, keep the one that came first in the list order.
Input: List of NotificationInfo
Output: List of NotificationInfo
Create a new function in the existing file
pipeline/utils/notifications.pyfor your implementation and add tests for it in the corresponding test file.