feat(billing): wire pruneDeadTokens into onEntitlementChanged
This commit is contained in:
parent
c7181e276f
commit
7b5790da43
|
|
@ -1,5 +1,6 @@
|
|||
import * as functions from 'firebase-functions'
|
||||
import * as admin from 'firebase-admin'
|
||||
import { pruneDeadTokens } from '../notifications/pruneTokens'
|
||||
|
||||
/**
|
||||
* Notifies the OTHER partner when a user GAINS premium, so couple-shared premium unlock isn't silent
|
||||
|
|
@ -110,5 +111,6 @@ export const onEntitlementChanged = functions.firestore
|
|||
console.warn(`[onEntitlementChanged] send failed ${tokens[i]}: ${String(r.reason)}`)
|
||||
}
|
||||
})
|
||||
await pruneDeadTokens(db, partnerId, tokens, results)
|
||||
console.log(`[onEntitlementChanged] notified ${partnerId} of couple premium (${coupleId})`)
|
||||
})
|
||||
|
|
|
|||
Loading…
Reference in New Issue