Enabled donations on Google Play
This commit is contained in:
parent
b597d4ec71
commit
cf3ad82a72
1 changed files with 8 additions and 4 deletions
12
src/index.ts
12
src/index.ts
|
@ -117,11 +117,15 @@ export async function handleRequest(request: Request) {
|
|||
servers: servers,
|
||||
};
|
||||
|
||||
// Disable donates for Google reviewers for all google app versions AFTER this one.
|
||||
const lastApprovedAndReleasedGoogleAppVersionCode = 221102;
|
||||
let donatesEnabled = true;
|
||||
if (appVersion.flavor == 'google') {
|
||||
// Disable donates for Google reviewers.
|
||||
if ((request.cf?.asOrganization || '').toLowerCase().includes('google') || appVersion.code == 221102)
|
||||
donatesEnabled = false;
|
||||
if (
|
||||
appVersion.flavor === 'google' &&
|
||||
((request.cf?.asOrganization || '').toLowerCase().includes('google') ||
|
||||
appVersion.code > lastApprovedAndReleasedGoogleAppVersionCode)
|
||||
) {
|
||||
donatesEnabled = false;
|
||||
}
|
||||
|
||||
if (donatesEnabled) {
|
||||
|
|
Loading…
Add table
Reference in a new issue