Enhance broadcast message handling to support multiple content types
- Updated the process_broadcast_message_handler to determine the content type of incoming messages (text, photo, video, etc.) and store relevant data in the state. - Implemented new methods in MessageQueueManager for queuing various media types, improving the flexibility of the broadcast system. - Adjusted confirmation prompts to provide a concise message preview, enhancing user experience. - Added localization for the new confirmation prompt in both English and Russian.
This commit is contained in:
@@ -50,7 +50,9 @@ class ReferralService:
|
||||
|
||||
# If configured to apply referral bonuses only once per invited user,
|
||||
# check if the referee already has succeeded payments.
|
||||
if self.settings.REFERRAL_ONE_BONUS_PER_REFEREE:
|
||||
# Use getattr with a safe default (True) to avoid AttributeError if
|
||||
# running with an older settings schema.
|
||||
if getattr(self.settings, "REFERRAL_ONE_BONUS_PER_REFEREE", True):
|
||||
try:
|
||||
succeeded_count = await payment_dal.count_user_succeeded_payments(
|
||||
session, referee_user_id, exclude_payment_id=current_payment_db_id
|
||||
|
||||
Reference in New Issue
Block a user