@@ -28,6 +28,9 @@ class DirectMessagesTopic(Object):
2828 id (``int``):
2929 Unique topic identifier inside this chat.
3030
31+ can_send_unpaid_messages (``bool``, *optional*):
32+ True, if the other party can send unpaid messages even if the chat has paid messages enabled.
33+
3134 is_marked_as_unread (``bool``):
3235 True, if the forum topic is marked as unread.
3336
@@ -51,6 +54,7 @@ def __init__(
5154 self ,
5255 * ,
5356 id : int ,
57+ can_send_unpaid_messages : bool = None ,
5458 is_marked_as_unread : bool = None ,
5559 unread_count : int = None ,
5660 last_read_inbox_message_id : int = None ,
@@ -61,6 +65,7 @@ def __init__(
6165 super ().__init__ ()
6266
6367 self .id = id
68+ self .can_send_unpaid_messages = can_send_unpaid_messages
6469 self .is_marked_as_unread = is_marked_as_unread
6570 self .unread_count = unread_count
6671 self .last_read_inbox_message_id = last_read_inbox_message_id
@@ -75,6 +80,7 @@ def _parse(topic: "raw.types.MonoForumDialog", messages: dict = {}, users: dict
7580
7681 return DirectMessagesTopic (
7782 id = topic .peer .user_id ,
83+ can_send_unpaid_messages = topic .nopaid_messages_exception ,
7884 is_marked_as_unread = topic .unread_mark ,
7985 unread_count = topic .unread_count ,
8086 last_read_inbox_message_id = topic .read_inbox_max_id ,
0 commit comments