fix: photos get repeated

This commit is contained in:
草师傅 2025-08-01 13:24:24 +08:00
parent b1d7267775
commit fe9da1a819

View file

@ -16,11 +16,14 @@ class MessageRepeater:
async def handle_message(self, message: aiogram.types.Message): async def handle_message(self, message: aiogram.types.Message):
"""Handle incoming messages and repeat when a threshold is met""" """Handle incoming messages and repeat when a threshold is met"""
chat_id = message.chat.id chat_id = message.chat.id
content = ''
if message.text: if message.text:
content = message.text content = message.text
elif message.sticker: elif message.sticker:
content = message.sticker.file_id content = message.sticker.file_id
elif message.photo:
content = message.photo[0].file_id
else:
return
if not config.is_feature_enabled('repeater', message.chat.id): if not config.is_feature_enabled('repeater', message.chat.id):
return return