From df7d2976b280ba0c1284bb4e075171263ef769ae Mon Sep 17 00:00:00 2001 From: Nora Trapp Date: Tue, 16 Nov 2021 12:36:35 -0800 Subject: [PATCH] Fetch the local profile after redeeming receipts --- .../Jobs/SubscriptionReceiptCredentialRedemptionJob.swift | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/SignalMessaging/Jobs/SubscriptionReceiptCredentialRedemptionJob.swift b/SignalMessaging/Jobs/SubscriptionReceiptCredentialRedemptionJob.swift index e3db404490..8abbbe579f 100644 --- a/SignalMessaging/Jobs/SubscriptionReceiptCredentialRedemptionJob.swift +++ b/SignalMessaging/Jobs/SubscriptionReceiptCredentialRedemptionJob.swift @@ -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()