Simplify some conditions

This commit is contained in:
JRoot Junior 2024-06-22 02:43:35 +03:00
parent c446b28d8b
commit b7bf18d0f0
No known key found for this signature in database
GPG key ID: 738964250D5FF6E2

View file

@ -87,8 +87,8 @@ class UserContextMiddleware(BaseMiddleware):
user=event.callback_query.from_user,
thread_id=(
callback_query_message.message_thread_id
if not isinstance(event.callback_query.message, InaccessibleMessage)
and event.callback_query.message.is_topic_message
if not isinstance(callback_query_message, InaccessibleMessage)
and callback_query_message.is_topic_message
else None
),
business_connection_id=callback_query_message.business_connection_id,