This commit is contained in:
harold 2025-06-16 18:04:51 +05:00
parent d46efe25dc
commit 22d72ed92b
2 changed files with 4 additions and 1 deletions

View File

@ -8,7 +8,7 @@ from src.core.common.schemas import BaseModelWithSerializeDatetime
class MessageFromChatSchema(BaseModelWithSerializeDatetime): class MessageFromChatSchema(BaseModelWithSerializeDatetime):
id: PositiveInt id: PositiveInt
user_id: PositiveInt user_id: PositiveInt
chat_id: NegativeInt chat_id: int
text: str text: str
message_time: datetime message_time: datetime

View File

@ -15,6 +15,9 @@ def check_message_condition(
sender: User, sender: User,
chat_type: CustomChatTypes, chat_type: CustomChatTypes,
) -> bool: ) -> bool:
if not sender:
return False
if isinstance(sender, Channel): if isinstance(sender, Channel):
return False return False