fix: if user is unsubscribed, and shouldn't show paywall, send message without running IGC (#1344)

pull/1593/head
ggurdin 11 months ago committed by GitHub
parent f4e9823384
commit 317cf88aca
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -87,9 +87,12 @@ class Choreographer {
return; return;
} }
if (pangeaController.subscriptionController.subscriptionStatus == if (!pangeaController.subscriptionController.isSubscribed) {
SubscriptionStatus.showPaywall) { // don't want to run IGC if user isn't subscribed, so either
OverlayUtil.showPositionedCard( // show the paywall if applicable or just send the message
final status = pangeaController.subscriptionController.subscriptionStatus;
status == SubscriptionStatus.showPaywall
? OverlayUtil.showPositionedCard(
context: context, context: context,
cardToShow: PaywallCard( cardToShow: PaywallCard(
chatController: chatController, chatController: chatController,
@ -97,7 +100,8 @@ class Choreographer {
maxHeight: 325, maxHeight: 325,
maxWidth: 325, maxWidth: 325,
transformTargetId: inputTransformTargetKey, transformTargetId: inputTransformTargetKey,
); )
: chatController.send();
return; return;
} }

Loading…
Cancel
Save