Do not copy empty messages
This commit is contained in:
parent
70efffa896
commit
eed331b1b1
@ -2902,6 +2902,9 @@ class Message(Object, Update):
|
|||||||
elif self.game and not await self._client.storage.is_bot():
|
elif self.game and not await self._client.storage.is_bot():
|
||||||
log.warning(f"Users cannot send messages with Game media type. "
|
log.warning(f"Users cannot send messages with Game media type. "
|
||||||
f"chat_id: {self.chat.id}, message_id: {self.message_id}")
|
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:
|
elif self.text:
|
||||||
return await self._client.send_message(
|
return await self._client.send_message(
|
||||||
chat_id,
|
chat_id,
|
||||||
|
Loading…
Reference in New Issue
Block a user