From 9ec35671ea97b682fd26e812246e06cec8f6a9a5 Mon Sep 17 00:00:00 2001 From: wulan17 Date: Tue, 8 Jul 2025 18:53:17 +0700 Subject: [PATCH] pyrofork: Add missing can_{append,complete} field to TodoList Signed-off-by: wulan17 --- pyrogram/types/messages_and_media/todo_list.py | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/pyrogram/types/messages_and_media/todo_list.py b/pyrogram/types/messages_and_media/todo_list.py index 88e0489b..5c30a4f0 100644 --- a/pyrogram/types/messages_and_media/todo_list.py +++ b/pyrogram/types/messages_and_media/todo_list.py @@ -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 )