Skip to content

MOEN-44410: Added support for epoch time attribute#99

Open
RakshithaAcharya wants to merge 1 commit into
developmentfrom
feature/MOEN-44410-epochtime-support
Open

MOEN-44410: Added support for epoch time attribute#99
RakshithaAcharya wants to merge 1 commit into
developmentfrom
feature/MOEN-44410-epochtime-support

Conversation

@RakshithaAcharya
Copy link
Copy Markdown
Contributor

Jira Ticket

Description

@moe-hodor
Copy link
Copy Markdown

moe-hodor Bot commented May 13, 2026

🚪 Hodor is reviewing this PR... 👀

@moe-hodor moe-hodor Bot added branch:feature Planned work — new functionality or enhancement (neutral CFR) cfr:neutral Change Failure Rate: neutral impact labels May 13, 2026
case MoEngagePluginConstants.UserAttribute.timestamp:
if let timeStamp = userAttribute.value as? String {
MoEngageSDKAnalytics.sharedInstance.setUserAttributeISODate(timeStamp, withAttributeName: userAttribute.name, forAppID: identifier)
} else if let timeStamp = userAttribute.value as? Double {
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Warning — Silent value type mismatch: If userAttribute.value is neither String (line 127) nor Double (line 128), the timestamp attribute is silently ignored with no logging or error. This happens when a plugin sends an Int, Float, NSNumber, or any other type for a timestamp attribute.

Impact: Plugin developers won't know their timestamp wasn't tracked. The general attribute handler (lines 116-123) has the same issue, so this is a pre-existing pattern in this codebase.

Suggestion: Consider adding an else clause after line 129:

} else {
    MoEngageLogger.logDefault(logLevel: .error, message: "Invalid timestamp value type for attribute '\(userAttribute.name)': expected String (ISO) or Double (epoch), got \(type(of: userAttribute.value))")
}

This helps plugin SDK authors debug integration issues. Not a blocker — log the warning in a follow-up ticket if desired.

Copy link
Copy Markdown

@moe-hodor moe-hodor Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review: MOEN-44410 - Added support for epoch time attribute

Issues (1 after filtering):
⚠️ Warning: 1

Hodor filtered 1 low-signal comment(s) to reduce noise.
Verdict: COMMENT

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

branch:feature Planned work — new functionality or enhancement (neutral CFR) cfr:neutral Change Failure Rate: neutral impact

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant