-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: add missing course properties in IAP restore & unfulfilled events #82
base: 2U/develop
Are you sure you want to change the base?
Conversation
fixes: LEARNER-10309
fixes: LEARNER-10309
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have four additional improvements to address that I forgot to mention in the underline ticket:
- Ensure the unfulfilled flow functions correctly, even when there's only a single course.
- Trigger
CourseUpgradeSuccess
regardless of the user's choice on the Unfulfilled Refresh-or-Continue dialog. - Include these properties in the
CourseUpgradeSuccess
event during the unfulfilled flow. - Since the flow sends only one event for all unfulfilled courses, it's better to limit it to one process per session or click to ensure the correct number of
CourseUpgradeSuccess
events are sent.
Thank you!
purchases.filter { it.accountIdentifiers?.obfuscatedAccountId?.decodeToLong() == userId } | ||
val userPurchases = purchases.filter { purchase -> | ||
val userAccountId = purchase.accountIdentifiers?.obfuscatedAccountId?.decodeToLong() | ||
val storeSku = purchase.accountIdentifiers?.obfuscatedProfileId?.decodeToString() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can use Purchase.getCourseSku()
extension function here.
val courseVerified = enrolledCourses.find { enrolledCourse -> | ||
enrolledCourse.productInfo?.courseSku == purchase.getCourseSku() | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This check is same as above.
suspend fun send(event: EnrolledCourseEvent) = channel.emit(event) | ||
|
||
suspend fun send(event: RequestEnrolledCourseEvent) = channel.emit(event) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should rename them and place them in IAPNotifier
.
Description
Jira: LEARNER-10309