pyrofork: Add missing can_{append,complete} field to TodoList

Signed-off-by: wulan17 <wulan17@komodos.id>
This commit is contained in:
wulan17 2025-07-08 18:53:17 +07:00
parent 92b831812f
commit 9ec35671ea
No known key found for this signature in database
GPG key ID: 737814D4B5FF0420

View file

@ -36,19 +36,29 @@ class TodoList(Object):
tasks (List of :obj:`~pyrogram.types.TodoTask`):
List of tasks in the todo list.
can_append (``bool``, optional):
True, if other users can append tasks to this todo list.
can_complete (``bool``, optional):
True, if other users can complete tasks in this todo list.
"""
def __init__(
self,
title: str,
entities: List["types.MessageEntity"],
tasks: List["types.TodoTask"] = None
tasks: List["types.TodoTask"] = None,
can_append: bool = False,
can_complete: bool = False
):
super().__init__()
self.title = title
self.entities = entities
self.tasks = tasks
self.can_append = can_append
self.can_complete = can_complete
@staticmethod
def _parse(
@ -67,5 +77,7 @@ class TodoList(Object):
return TodoList(
title=todo_list.title.text,
entities=entities,
tasks=tasks
tasks=tasks,
can_append=todo_list.others_can_append,
can_complete=todo_list.others_can_complete
)