Skip to content

Commit 0d761c9

Browse files
Update cmab entity id matching logic
1 parent d1067d6 commit 0d761c9

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

Sources/Implementation/DefaultDecisionService.swift

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,17 +104,16 @@ class DefaultDecisionService: OPTDecisionService {
104104
reasons.merge(_reasons)
105105
}
106106

107-
let entityId = bucketedResponse?.result ?? ""
107+
let entityId = bucketedResponse?.result
108108

109109
// this means the user is not in the cmab experiment
110-
if entityId != dummyEntityId {
110+
if entityId == nil {
111111
let info = LogMessage.userNotInCmabExperiment(user.userId, experiment.key)
112112
logger.d(info)
113113
reasons.addInfo(info)
114114
return DecisionResponse(result: nil, reasons: reasons)
115115
}
116116

117-
118117
/// Fetch CMAB decision
119118
let response = cmabService.getDecision(config: config, userContext: user, ruleId: experiment.id, options: options ?? [])
120119
var cmabDecision: CmabDecision?

0 commit comments

Comments
 (0)