| 189 | } |
| 190 | |
| 191 | MTPTodoList TodoListDataToMTP(not_null<const TodoListData*> todolist) { |
| 192 | using Flag = MTPDtodoList::Flag; |
| 193 | const auto flags = Flag() |
| 194 | | (todolist->othersCanAppend() |
| 195 | ? Flag::f_others_can_append |
| 196 | : Flag()) |
| 197 | | (todolist->othersCanComplete() |
| 198 | ? Flag::f_others_can_complete |
| 199 | : Flag()); |
| 200 | return MTP_todoList( |
| 201 | MTP_flags(flags), |
| 202 | MTP_textWithEntities( |
| 203 | MTP_string(todolist->title.text), |
| 204 | Api::EntitiesToMTP( |
| 205 | &todolist->session(), |
| 206 | todolist->title.entities)), |
| 207 | TodoListItemsToMTP(&todolist->session(), todolist->items)); |
| 208 | } |
| 209 | |
| 210 | MTPInputMedia TodoListDataToInputMedia( |
| 211 | not_null<const TodoListData*> todolist) { |
no test coverage detected