From 5a302de7e5869d346dea23994b9a9890e86f500a Mon Sep 17 00:00:00 2001 From: Sattvik Chakravarthy Date: Fri, 30 Jun 2023 19:40:32 +0530 Subject: [PATCH] fix: feature flag issue (#733) * fix: feature flag issue * fix: mau -1 for mongo --- ee/src/main/java/io/supertokens/ee/EEFeatureFlag.java | 2 +- src/main/java/io/supertokens/cronjobs/telemetry/Telemetry.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ee/src/main/java/io/supertokens/ee/EEFeatureFlag.java b/ee/src/main/java/io/supertokens/ee/EEFeatureFlag.java index fda37a46b..2b0a94dba 100644 --- a/ee/src/main/java/io/supertokens/ee/EEFeatureFlag.java +++ b/ee/src/main/java/io/supertokens/ee/EEFeatureFlag.java @@ -288,7 +288,7 @@ public JsonObject getPaidFeatureStats() throws StorageQueryException, TenantOrAp EE_FEATURES[] features = getEnabledEEFeaturesFromDbOrCache(); - if (!Arrays.asList(features).contains(EE_FEATURES.MULTI_TENANCY)) { // Check for multitenancy on the base app + if (!this.appIdentifier.equals(new AppIdentifier(null, null)) && !Arrays.asList(features).contains(EE_FEATURES.MULTI_TENANCY)) { // Check for multitenancy on the base app EE_FEATURES[] baseFeatures = FeatureFlag.getInstance(main, new AppIdentifier(null, null)) .getEnabledFeatures(); for (EE_FEATURES feature: baseFeatures) { diff --git a/src/main/java/io/supertokens/cronjobs/telemetry/Telemetry.java b/src/main/java/io/supertokens/cronjobs/telemetry/Telemetry.java index cf2b1a028..727d2f5ec 100644 --- a/src/main/java/io/supertokens/cronjobs/telemetry/Telemetry.java +++ b/src/main/java/io/supertokens/cronjobs/telemetry/Telemetry.java @@ -94,7 +94,7 @@ protected void doTaskPerApp(AppIdentifier app) throws Exception { ActiveUsersStorage activeUsersStorage = (ActiveUsersStorage) StorageLayer.getStorage(app.getAsPublicTenantIdentifier(), main); json.addProperty("mau", activeUsersStorage.countUsersActiveSince(app, System.currentTimeMillis() - 30 * 24 * 3600 * 1000L)); } else { - json.addProperty("mau", 0); + json.addProperty("mau", -1); } json.addProperty("appId", app.getAppId()); json.addProperty("connectionUriDomain", app.getConnectionUriDomain());