mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
dedupe channels
This commit is contained in:
parent
0692ab0454
commit
a9dd2d0d4c
1 changed files with 3 additions and 1 deletions
|
|
@ -598,8 +598,10 @@ const sendNotifications = async (
|
|||
channels: Channel[],
|
||||
digest: Digest
|
||||
) => {
|
||||
const deduplicateChannels = [...new Set(channels)]
|
||||
|
||||
await Promise.all(
|
||||
channels.map(async (channel) => {
|
||||
deduplicateChannels.map(async (channel) => {
|
||||
switch (channel) {
|
||||
case 'push':
|
||||
return sendPushNotification(user.id, digest)
|
||||
|
|
|
|||
Loading…
Reference in a new issue