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,17 +87,21 @@ 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
context: context, final status = pangeaController.subscriptionController.subscriptionStatus;
cardToShow: PaywallCard( status == SubscriptionStatus.showPaywall
chatController: chatController, ? OverlayUtil.showPositionedCard(
), context: context,
maxHeight: 325, cardToShow: PaywallCard(
maxWidth: 325, chatController: chatController,
transformTargetId: inputTransformTargetKey, ),
); maxHeight: 325,
maxWidth: 325,
transformTargetId: inputTransformTargetKey,
)
: chatController.send();
return; return;
} }

Loading…
Cancel
Save