-
Notifications
You must be signed in to change notification settings - Fork 43
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
Send initiation_source
in post receipt requests
#1212
Send initiation_source
in post receipt requests
#1212
Conversation
initiation_source
in post receipt requests
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #1212 +/- ##
==========================================
+ Coverage 85.89% 85.93% +0.04%
==========================================
Files 183 184 +1
Lines 6251 6269 +18
Branches 910 911 +1
==========================================
+ Hits 5369 5387 +18
Misses 536 536
Partials 346 346
☔ View full report in Codecov by Sentry. |
@@ -234,6 +234,7 @@ internal class PurchasesOrchestrator constructor( | |||
this.allowSharingPlayStoreAccount, | |||
appUserID, | |||
marketplace = null, | |||
PostReceiptInitiationSource.RESTORE, |
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'm assuming RESTORE
for syncing amazon here... which might depends on the user's implementation. Alternatively, we could add another source for this, but seemed unnecessary since it's still kinda a sync, even if it happens right after a purchase. Lmk if you think otherwise @aboedo
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.
yeah, this is a tricky one.
For observer mode for any other store we'd do queue
, right? Maybe we should do the same here? It'd mean we don't alias unless you specifically call logIn I suppose, which should be a good thing?
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.
Well, for observer mode in android we would actually do purchase
, since it's coming from the listener.
In Android, we only use queue
when syncing unsynced purchases on app open/foreground. That doesn't actually use the listener.
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.
So for purchases outside the app, it would also be purchase
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.
Nice!
**This is an automatic release.** ### Dependency Updates * Bump fastlane-plugin-revenuecat_internal from `b2108fb` to `a297205` (#1210) via dependabot[bot] (@dependabot[bot]) ### Other Changes * Rename `queue` initiation source to `unsynced_active_purchases` (#1214) via Toni Rico (@tonidero) * Send `initiation_source` in post receipt requests (#1212) via Toni Rico (@tonidero) * CustomEntitlementComputation: Add `restorePurchases` (#1211) via Toni Rico (@tonidero) * Unify caching offerings and updating update timestamp (#1206) via Toni Rico (@tonidero) Co-authored-by: revenuecat-ops <ops@revenuecat.com>
Description
This PR adds a new
initiation_source
field to the post receipt body that indicates where the receipt was originated from. This is already done in iOS.