terminating early
Browse files
App/Messages/MessagesRoute.py
CHANGED
@@ -95,8 +95,12 @@ async def receive_message(message_data: MessageCreate):
|
|
95 |
)
|
96 |
|
97 |
# Ensure 'create_payment' is an async function
|
98 |
-
payment
|
99 |
-
|
|
|
|
|
|
|
|
|
100 |
|
101 |
# Create a new message record with parsed_data
|
102 |
message = await Message.create(
|
|
|
95 |
)
|
96 |
|
97 |
# Ensure 'create_payment' is an async function
|
98 |
+
payment = await create_payment(payment_details, internal=True)
|
99 |
+
|
100 |
+
if isinstance(payment, Payment):
|
101 |
+
await payment.create_subscription_or_balance()
|
102 |
+
else:
|
103 |
+
return payment
|
104 |
|
105 |
# Create a new message record with parsed_data
|
106 |
message = await Message.create(
|