Fixes bad check of an array (#172)

This commit is contained in:
Chris Anderson 2023-05-24 17:17:25 -05:00 committed by GitHub
parent 0867a81ebe
commit 9554d17a1d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -139,7 +139,7 @@ export const subscribeAll = async (user: User): Promise<void> => {
if (user.phone) {
channels.push('text')
}
if (user.pushEnabledDevices) {
if (user.pushEnabledDevices.length) {
channels.push('push')
}
const subscriptions = await allSubscriptions(user.project_id, channels)