Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions hydrogram/types/user_and_chats/chat.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ class Chat(Object):
is_verified (``bool``, *optional*):
True, if this chat has been verified by Telegram. Supergroups, channels and bots only.

is_participants_hidden (``bool``, *optional*):
True, if this chat members has been hidden.

is_restricted (``bool``, *optional*):
True, if this chat has been restricted. Supergroups, channels and bots only.
See *restriction_reason* for details.
Expand Down Expand Up @@ -150,6 +153,7 @@ def __init__(
id: int,
type: "enums.ChatType",
is_verified: Optional[bool] = None,
is_participants_hidden: Optional[bool] = None,
is_restricted: Optional[bool] = None,
is_creator: Optional[bool] = None,
is_scam: Optional[bool] = None,
Expand Down Expand Up @@ -184,6 +188,7 @@ def __init__(
self.id = id
self.type = type
self.is_verified = is_verified
self.is_participants_hidden = is_participants_hidden
self.is_restricted = is_restricted
self.is_creator = is_creator
self.is_scam = is_scam
Expand Down Expand Up @@ -359,6 +364,9 @@ async def _parse_full(
# TODO: Add StickerSet type
parsed_chat.can_set_sticker_set = full_chat.can_set_stickers
parsed_chat.sticker_set_name = getattr(full_chat.stickerset, "short_name", None)
parsed_chat.is_participants_hidden = getattr(
full_chat, "participants_hidden", False
)

if linked_chat_raw := chats.get(full_chat.linked_chat_id):
parsed_chat.linked_chat = Chat._parse_channel_chat(client, linked_chat_raw)
Expand Down