Enabled donations on Google Play

This commit is contained in:
Alexander Borsuk 2022-11-08 16:45:43 +01:00 committed by Alexander Borsuk
parent b597d4ec71
commit cf3ad82a72

View file

@ -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) {