Send initiation_source in post receipt requests#1212
Conversation
initiation_source in post receipt requests
Codecov ReportAll modified and coverable lines are covered by tests ✅
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. |
| this.allowSharingPlayStoreAccount, | ||
| appUserID, | ||
| marketplace = null, | ||
| PostReceiptInitiationSource.RESTORE, |
There was a problem hiding this comment.
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.
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.
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.
So for purchases outside the app, it would also be purchase
**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_sourcefield to the post receipt body that indicates where the receipt was originated from. This is already done in iOS.