Signal-iOS/SignalMessaging
Evan Hahn f5556d1857
Use durable job for sending badge gifts
Previously, sending a gift badge was not a durable operation, which
meant that crashes/failures could cause users to have their payment
methods charged without actually sending the badge.

Now, the flow is split up into two steps: non-durable parts before the
charge is attempted, and durable parts afterward.

The high-level flow is:

1. Prepare the payment, which involves a couple of repeatable network
   requests.
2. Enqueue a job with the prepared payment, that:
   1. Charges the payment method (idempotently)
   2. Requests a receipt credential (idempotently)
   3. Enqueues a gift message, and optionally a text message
3. When the job completes, open the conversation in the UI.
2022-07-01 17:10:31 -05:00
..
attachments Prevent non-temporary-file attachments from being deleted when shared 2022-06-22 13:15:04 -07:00
calls Ignore peek call errors in staging 2022-06-29 14:32:19 -05:00
categories Add rendering support for Gift Badges 2022-06-22 08:05:25 -07:00
contacts Initial story sending support 2022-06-10 22:28:03 -04:00
Donations Use durable job for sending badge gifts 2022-07-01 17:10:31 -05:00
environment Ignore checkpointing errors on launch 2022-06-24 22:27:01 -05:00
groups Remove args always passed as nil that were later unused anyway 2022-06-29 09:19:02 -07:00
Notifications Fix notification comment typo; avoid forced unwrap 2022-07-01 09:49:26 -07:00
Payments Fix SwiftLint is_disjoint violations 2022-05-25 14:17:10 +00:00
profiles Initial story sending support 2022-06-10 22:28:03 -04:00
Storage Service Remove redundant Storage Service assertion 2022-06-24 14:10:18 -07:00
Subscriptions Use durable job for sending badge gifts 2022-07-01 17:10:31 -05:00
test Fix SwiftLint shorthand_operator violations 2022-06-07 14:51:57 +00:00
utils Add support for redeeming gift badges 2022-07-01 14:07:24 -07:00
Info.plist Shared framework between app and extension 2017-11-29 13:58:27 -08:00
SignalMessaging-Prefix.pch minor changes due to changed name of NSLocalizedStringFromAppBundle (now OWSLocalizedString) and new location of swift function and preprocessor definition 2022-03-11 14:08:26 +01:00
SignalMessaging.h Copy in AFNetworking's query string encoding implementation 2021-12-17 14:52:59 -08:00