Changeset View
Changeset View
Standalone View
Standalone View
keyserver/src/push/rescind.js
Show First 20 Lines • Show All 63 Lines • ▼ Show 20 Lines | for (const delivery of deliveries) { | ||||
} else if (delivery.androidID) { | } else if (delivery.androidID) { | ||||
// Old Android | // Old Android | ||||
const notification = prepareAndroidNotification( | const notification = prepareAndroidNotification( | ||||
row.collapse_key ? row.collapse_key : id, | row.collapse_key ? row.collapse_key : id, | ||||
row.unread_count, | row.unread_count, | ||||
threadID, | threadID, | ||||
); | ); | ||||
deliveryPromises[id] = fcmPush({ | deliveryPromises[id] = fcmPush({ | ||||
notification, | notifications: [notification], | ||||
deviceTokens: delivery.androidDeviceTokens, | deviceTokens: delivery.androidDeviceTokens, | ||||
codeVersion: null, | codeVersion: null, | ||||
}); | }); | ||||
} else if (delivery.deviceType === 'ios') { | } else if (delivery.deviceType === 'ios') { | ||||
// New iOS | // New iOS | ||||
const { iosID, deviceTokens, codeVersion } = delivery; | const { iosID, deviceTokens, codeVersion } = delivery; | ||||
const notifications = [ | const notifications = [ | ||||
prepareIOSNotification( | prepareIOSNotification( | ||||
Show All 12 Lines | for (const delivery of deliveries) { | ||||
// New Android | // New Android | ||||
const { deviceTokens, codeVersion } = delivery; | const { deviceTokens, codeVersion } = delivery; | ||||
const notification = prepareAndroidNotification( | const notification = prepareAndroidNotification( | ||||
row.collapse_key ? row.collapse_key : id, | row.collapse_key ? row.collapse_key : id, | ||||
row.unread_count, | row.unread_count, | ||||
threadID, | threadID, | ||||
); | ); | ||||
deliveryPromises[id] = fcmPush({ | deliveryPromises[id] = fcmPush({ | ||||
notification, | notifications: [notification], | ||||
deviceTokens, | deviceTokens, | ||||
codeVersion, | codeVersion, | ||||
}); | }); | ||||
} | } | ||||
} | } | ||||
rescindedIDs.push(row.id); | rescindedIDs.push(row.id); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 105 Lines • Show Last 20 Lines |