Fetch the local profile after redeeming receipts

This commit is contained in:
Nora Trapp 2021-11-16 12:36:35 -08:00
parent 800ad14ab5
commit df7d2976b2

View File

@ -140,6 +140,8 @@ public class SubscriptionReceiptCredentailRedemptionOperation: OWSOperation, Dur
firstly(on: .global()) {
return try SubscriptionManager.redeemReceiptCredentialPresentation(receiptCredentialPresentation: presentation)
}.then(on: .global()) {
self.profileManagerImpl.fetchLocalUsersProfilePromise().asVoid()
}.done(on: .global()) {
Logger.debug("Presentation completed successfully")
self.didSucceed()
@ -157,6 +159,8 @@ public class SubscriptionReceiptCredentailRedemptionOperation: OWSOperation, Dur
priorSubscriptionLevel: self.priorSubscriptionLevel)
}.then { newReceiptCredentialPresentation in
return try SubscriptionManager.redeemReceiptCredentialPresentation(receiptCredentialPresentation: newReceiptCredentialPresentation)
}.then(on: .global()) {
self.profileManagerImpl.fetchLocalUsersProfilePromise().asVoid()
}.done(on: .global()) {
Logger.debug("Presentation completed successfully")
self.didSucceed()