mirror of
https://fast.feibisi.com/https://github.com/parcelvoy/platform.git
synced 2025-09-01 12:26:08 +08:00
fix: build
This commit is contained in:
parent
c2cd905e6a
commit
43a1ea49f7
1 changed files with 2 additions and 2 deletions
|
@ -571,9 +571,9 @@ export const estimatedSendSize = async (campaign: Campaign) => {
|
|||
return lists.reduce((acc, list) => (list.users_count ?? 0) + acc, 0)
|
||||
}
|
||||
|
||||
export const canSendCampaignToUser = (campaign: Campaign, user: Pick<User, 'email' | 'phone' | 'has_push_device' | 'devices'>) => {
|
||||
export const canSendCampaignToUser = (campaign: Campaign, user: Pick<User, 'email' | 'phone' | 'devices'>) => {
|
||||
if (campaign.channel === 'email' && !user.email) return false
|
||||
if (campaign.channel === 'text' && !user.phone) return false
|
||||
if (campaign.channel === 'push' && !(user.has_push_device || !!user.devices)) return false
|
||||
if (campaign.channel === 'push' && !user.devices) return false
|
||||
return true
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue