Do not copy empty messages

This commit is contained in:
Dan 2021-03-21 22:10:33 +01:00
parent 70efffa896
commit eed331b1b1

View File

@ -2902,6 +2902,9 @@ class Message(Object, Update):
elif self.game and not await self._client.storage.is_bot():
log.warning(f"Users cannot send messages with Game media type. "
f"chat_id: {self.chat.id}, message_id: {self.message_id}")
elif self.empty:
log.warning(f"Empty messages cannot be copied. "
f"chat_id: {self.chat.id}, message_id: {self.message_id}")
elif self.text:
return await self._client.send_message(
chat_id,