Bug 1870829 - Add review checker enabled attribute for custom targeting

(cherry picked from commit f8a24b062839d6b02a664dd342cf6314c4143d6b)
fenix/122.0
rahulsainani 5 months ago committed by mergify[bot]
parent d44b60e972
commit ba312cfbac

@ -35,11 +35,14 @@ object CustomAttributeProvider : JexlAttributeProvider {
* will unlikely to targeted as expected.
*/
fun getCustomTargetingAttributes(context: Context): JSONObject {
val isFirstRun = context.settings().isFirstNimbusRun
val settings = context.settings()
val isFirstRun = settings.isFirstNimbusRun
val isReviewCheckerEnabled = settings.isReviewQualityCheckEnabled
return JSONObject(
mapOf(
// By convention, we should use snake case.
"is_first_run" to isFirstRun,
"is_review_checker_enabled" to isReviewCheckerEnabled,
// This camelCase attribute is a boolean value represented as a string.
// This is left for backwards compatibility.
@ -74,7 +77,8 @@ object CustomAttributeProvider : JexlAttributeProvider {
UTM_TERM to settings.utmTerm,
UTM_CONTENT to settings.utmContent,
"are_notifications_enabled" to NotificationManagerCompat.from(context).areNotificationsEnabledSafe(),
"are_notifications_enabled" to NotificationManagerCompat.from(context)
.areNotificationsEnabledSafe(),
),
)
}

Loading…
Cancel
Save