python-trueconf-bot 1.1.8__tar.gz → 1.2.0b1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (196) hide show
  1. {python_trueconf_bot-1.1.8 → python_trueconf_bot-1.2.0b1}/.gitignore +2 -1
  2. {python_trueconf_bot-1.1.8 → python_trueconf_bot-1.2.0b1}/PKG-INFO +3 -3
  3. {python_trueconf_bot-1.1.8 → python_trueconf_bot-1.2.0b1}/docs/ru/learn/files.md +45 -0
  4. {python_trueconf_bot-1.1.8 → python_trueconf_bot-1.2.0b1}/pyproject.toml +2 -4
  5. {python_trueconf_bot-1.1.8 → python_trueconf_bot-1.2.0b1}/python_trueconf_bot.egg-info/PKG-INFO +3 -3
  6. {python_trueconf_bot-1.1.8 → python_trueconf_bot-1.2.0b1}/python_trueconf_bot.egg-info/SOURCES.txt +7 -0
  7. {python_trueconf_bot-1.1.8 → python_trueconf_bot-1.2.0b1}/python_trueconf_bot.egg-info/requires.txt +4 -1
  8. {python_trueconf_bot-1.1.8 → python_trueconf_bot-1.2.0b1}/trueconf/_version.py +3 -3
  9. {python_trueconf_bot-1.1.8 → python_trueconf_bot-1.2.0b1}/trueconf/client/bot.py +92 -23
  10. {python_trueconf_bot-1.1.8 → python_trueconf_bot-1.2.0b1}/trueconf/dispatcher/router.py +2 -0
  11. {python_trueconf_bot-1.1.8 → python_trueconf_bot-1.2.0b1}/trueconf/enums/incoming_update_method.py +2 -0
  12. {python_trueconf_bot-1.1.8 → python_trueconf_bot-1.2.0b1}/trueconf/enums/message_type.py +4 -0
  13. {python_trueconf_bot-1.1.8 → python_trueconf_bot-1.2.0b1}/trueconf/methods/__init__.py +2 -0
  14. {python_trueconf_bot-1.1.8 → python_trueconf_bot-1.2.0b1}/trueconf/methods/auth.py +3 -2
  15. python_trueconf_bot-1.2.0b1/trueconf/methods/edit_chat_title.py +22 -0
  16. python_trueconf_bot-1.2.0b1/trueconf/methods/get_file_upload_limits.py +16 -0
  17. {python_trueconf_bot-1.1.8 → python_trueconf_bot-1.2.0b1}/trueconf/methods/upload_file.py +2 -0
  18. {python_trueconf_bot-1.1.8 → python_trueconf_bot-1.2.0b1}/trueconf/types/__init__.py +4 -0
  19. python_trueconf_bot-1.2.0b1/trueconf/types/content/location.py +10 -0
  20. {python_trueconf_bot-1.1.8 → python_trueconf_bot-1.2.0b1}/trueconf/types/input_file.py +172 -87
  21. {python_trueconf_bot-1.1.8 → python_trueconf_bot-1.2.0b1}/trueconf/types/message.py +9 -1
  22. {python_trueconf_bot-1.1.8 → python_trueconf_bot-1.2.0b1}/trueconf/types/parser.py +22 -7
  23. {python_trueconf_bot-1.1.8 → python_trueconf_bot-1.2.0b1}/trueconf/types/requests/__init__.py +4 -0
  24. python_trueconf_bot-1.2.0b1/trueconf/types/requests/changed_file_upload_limits.py +18 -0
  25. python_trueconf_bot-1.2.0b1/trueconf/types/requests/edited_chat_title.py +9 -0
  26. {python_trueconf_bot-1.1.8 → python_trueconf_bot-1.2.0b1}/trueconf/types/responses/__init__.py +46 -42
  27. python_trueconf_bot-1.2.0b1/trueconf/types/responses/edit_chat_title_response.py +9 -0
  28. python_trueconf_bot-1.2.0b1/trueconf/types/responses/get_file_upload_limits_response.py +16 -0
  29. {python_trueconf_bot-1.1.8 → python_trueconf_bot-1.2.0b1}/.github/workflows/docs.yml +0 -0
  30. {python_trueconf_bot-1.1.8 → python_trueconf_bot-1.2.0b1}/.github/workflows/release-test.yml +0 -0
  31. {python_trueconf_bot-1.1.8 → python_trueconf_bot-1.2.0b1}/.github/workflows/release.yml +0 -0
  32. {python_trueconf_bot-1.1.8 → python_trueconf_bot-1.2.0b1}/LICENSE +0 -0
  33. {python_trueconf_bot-1.1.8 → python_trueconf_bot-1.2.0b1}/README-PyPI.md +0 -0
  34. {python_trueconf_bot-1.1.8 → python_trueconf_bot-1.2.0b1}/README-ru.md +0 -0
  35. {python_trueconf_bot-1.1.8 → python_trueconf_bot-1.2.0b1}/README.md +0 -0
  36. {python_trueconf_bot-1.1.8 → python_trueconf_bot-1.2.0b1}/assets/head_en.png +0 -0
  37. {python_trueconf_bot-1.1.8 → python_trueconf_bot-1.2.0b1}/assets/head_ru.png +0 -0
  38. {python_trueconf_bot-1.1.8 → python_trueconf_bot-1.2.0b1}/assets/logo.svg +0 -0
  39. {python_trueconf_bot-1.1.8 → python_trueconf_bot-1.2.0b1}/docs/en/examples/echo_bot.md +0 -0
  40. {python_trueconf_bot-1.1.8 → python_trueconf_bot-1.2.0b1}/docs/en/examples/multibot.md +0 -0
  41. {python_trueconf_bot-1.1.8 → python_trueconf_bot-1.2.0b1}/docs/en/features.md +0 -0
  42. {python_trueconf_bot-1.1.8 → python_trueconf_bot-1.2.0b1}/docs/en/img/head.png +0 -0
  43. {python_trueconf_bot-1.1.8 → python_trueconf_bot-1.2.0b1}/docs/en/img/router_scheme_en.svg +0 -0
  44. {python_trueconf_bot-1.1.8 → python_trueconf_bot-1.2.0b1}/docs/en/index.md +0 -0
  45. {python_trueconf_bot-1.1.8 → python_trueconf_bot-1.2.0b1}/docs/en/learn/enums.md +0 -0
  46. {python_trueconf_bot-1.1.8 → python_trueconf_bot-1.2.0b1}/docs/en/learn/files.md +0 -0
  47. {python_trueconf_bot-1.1.8 → python_trueconf_bot-1.2.0b1}/docs/en/learn/filters.md +0 -0
  48. {python_trueconf_bot-1.1.8 → python_trueconf_bot-1.2.0b1}/docs/en/learn/getting-started.md +0 -0
  49. {python_trueconf_bot-1.1.8 → python_trueconf_bot-1.2.0b1}/docs/en/learn/parse-messages.md +0 -0
  50. {python_trueconf_bot-1.1.8 → python_trueconf_bot-1.2.0b1}/docs/en/learn/types.md +0 -0
  51. {python_trueconf_bot-1.1.8 → python_trueconf_bot-1.2.0b1}/docs/en/reference/Bot.md +0 -0
  52. {python_trueconf_bot-1.1.8 → python_trueconf_bot-1.2.0b1}/docs/en/reference/Dispatcher.md +0 -0
  53. {python_trueconf_bot-1.1.8 → python_trueconf_bot-1.2.0b1}/docs/en/reference/Enums.md +0 -0
  54. {python_trueconf_bot-1.1.8 → python_trueconf_bot-1.2.0b1}/docs/en/reference/Responses.md +0 -0
  55. {python_trueconf_bot-1.1.8 → python_trueconf_bot-1.2.0b1}/docs/en/reference/Router.md +0 -0
  56. {python_trueconf_bot-1.1.8 → python_trueconf_bot-1.2.0b1}/docs/en/reference/Types.md +0 -0
  57. {python_trueconf_bot-1.1.8 → python_trueconf_bot-1.2.0b1}/docs/en/reference/index.md +0 -0
  58. {python_trueconf_bot-1.1.8 → python_trueconf_bot-1.2.0b1}/docs/en/release_notes.md +0 -0
  59. {python_trueconf_bot-1.1.8 → python_trueconf_bot-1.2.0b1}/docs/img/chatbot.svg +0 -0
  60. {python_trueconf_bot-1.1.8 → python_trueconf_bot-1.2.0b1}/docs/img/favicon.ico +0 -0
  61. {python_trueconf_bot-1.1.8 → python_trueconf_bot-1.2.0b1}/docs/img/logo.svg +0 -0
  62. {python_trueconf_bot-1.1.8 → python_trueconf_bot-1.2.0b1}/docs/overrides/main.html +0 -0
  63. {python_trueconf_bot-1.1.8 → python_trueconf_bot-1.2.0b1}/docs/ru/examples/echo_bot.md +0 -0
  64. {python_trueconf_bot-1.1.8 → python_trueconf_bot-1.2.0b1}/docs/ru/examples/multibot.md +0 -0
  65. {python_trueconf_bot-1.1.8 → python_trueconf_bot-1.2.0b1}/docs/ru/features.md +0 -0
  66. {python_trueconf_bot-1.1.8 → python_trueconf_bot-1.2.0b1}/docs/ru/img/head.png +0 -0
  67. {python_trueconf_bot-1.1.8 → python_trueconf_bot-1.2.0b1}/docs/ru/img/router_scheme_ru.svg +0 -0
  68. {python_trueconf_bot-1.1.8 → python_trueconf_bot-1.2.0b1}/docs/ru/index.md +0 -0
  69. {python_trueconf_bot-1.1.8 → python_trueconf_bot-1.2.0b1}/docs/ru/learn/enums.md +0 -0
  70. {python_trueconf_bot-1.1.8 → python_trueconf_bot-1.2.0b1}/docs/ru/learn/filters.md +0 -0
  71. {python_trueconf_bot-1.1.8 → python_trueconf_bot-1.2.0b1}/docs/ru/learn/getting-started.md +0 -0
  72. {python_trueconf_bot-1.1.8 → python_trueconf_bot-1.2.0b1}/docs/ru/learn/parse-messages.md +0 -0
  73. {python_trueconf_bot-1.1.8 → python_trueconf_bot-1.2.0b1}/docs/ru/learn/types.md +0 -0
  74. {python_trueconf_bot-1.1.8 → python_trueconf_bot-1.2.0b1}/docs/ru/release_notes.md +0 -0
  75. {python_trueconf_bot-1.1.8 → python_trueconf_bot-1.2.0b1}/docs/stylesheets/extra.css +0 -0
  76. {python_trueconf_bot-1.1.8 → python_trueconf_bot-1.2.0b1}/examples/README-ru.md +0 -0
  77. {python_trueconf_bot-1.1.8 → python_trueconf_bot-1.2.0b1}/examples/README.md +0 -0
  78. {python_trueconf_bot-1.1.8 → python_trueconf_bot-1.2.0b1}/examples/add_big_list_users_to_channel.py +0 -0
  79. {python_trueconf_bot-1.1.8 → python_trueconf_bot-1.2.0b1}/examples/filters.py +0 -0
  80. {python_trueconf_bot-1.1.8 → python_trueconf_bot-1.2.0b1}/examples/report_bot.py +0 -0
  81. {python_trueconf_bot-1.1.8 → python_trueconf_bot-1.2.0b1}/examples/update_token.py +0 -0
  82. {python_trueconf_bot-1.1.8 → python_trueconf_bot-1.2.0b1}/examples/webhook.py +0 -0
  83. {python_trueconf_bot-1.1.8 → python_trueconf_bot-1.2.0b1}/mkdocs.yml +0 -0
  84. {python_trueconf_bot-1.1.8 → python_trueconf_bot-1.2.0b1}/python_trueconf_bot.egg-info/dependency_links.txt +0 -0
  85. {python_trueconf_bot-1.1.8 → python_trueconf_bot-1.2.0b1}/python_trueconf_bot.egg-info/top_level.txt +0 -0
  86. {python_trueconf_bot-1.1.8 → python_trueconf_bot-1.2.0b1}/requirements-docs.txt +0 -0
  87. {python_trueconf_bot-1.1.8 → python_trueconf_bot-1.2.0b1}/requirements.txt +0 -0
  88. {python_trueconf_bot-1.1.8 → python_trueconf_bot-1.2.0b1}/setup.cfg +0 -0
  89. {python_trueconf_bot-1.1.8 → python_trueconf_bot-1.2.0b1}/trueconf/__init__.py +0 -0
  90. {python_trueconf_bot-1.1.8 → python_trueconf_bot-1.2.0b1}/trueconf/client/__init__.py +0 -0
  91. {python_trueconf_bot-1.1.8 → python_trueconf_bot-1.2.0b1}/trueconf/client/context_controller.py +0 -0
  92. {python_trueconf_bot-1.1.8 → python_trueconf_bot-1.2.0b1}/trueconf/client/session.py +0 -0
  93. {python_trueconf_bot-1.1.8 → python_trueconf_bot-1.2.0b1}/trueconf/dispatcher/__init__.py +0 -0
  94. {python_trueconf_bot-1.1.8 → python_trueconf_bot-1.2.0b1}/trueconf/dispatcher/dispatcher.py +0 -0
  95. {python_trueconf_bot-1.1.8 → python_trueconf_bot-1.2.0b1}/trueconf/enums/__init__.py +0 -0
  96. {python_trueconf_bot-1.1.8 → python_trueconf_bot-1.2.0b1}/trueconf/enums/aouth_error.py +0 -0
  97. {python_trueconf_bot-1.1.8 → python_trueconf_bot-1.2.0b1}/trueconf/enums/chat_participant_role.py +0 -0
  98. {python_trueconf_bot-1.1.8 → python_trueconf_bot-1.2.0b1}/trueconf/enums/chat_type.py +0 -0
  99. {python_trueconf_bot-1.1.8 → python_trueconf_bot-1.2.0b1}/trueconf/enums/envelope_author_type.py +0 -0
  100. {python_trueconf_bot-1.1.8 → python_trueconf_bot-1.2.0b1}/trueconf/enums/file_ready_state.py +0 -0
  101. {python_trueconf_bot-1.1.8 → python_trueconf_bot-1.2.0b1}/trueconf/enums/parse_mode.py +0 -0
  102. {python_trueconf_bot-1.1.8 → python_trueconf_bot-1.2.0b1}/trueconf/enums/survey_type.py +0 -0
  103. {python_trueconf_bot-1.1.8 → python_trueconf_bot-1.2.0b1}/trueconf/enums/update_type.py +0 -0
  104. {python_trueconf_bot-1.1.8 → python_trueconf_bot-1.2.0b1}/trueconf/exceptions.py +0 -0
  105. {python_trueconf_bot-1.1.8 → python_trueconf_bot-1.2.0b1}/trueconf/filters/__init__.py +0 -0
  106. {python_trueconf_bot-1.1.8 → python_trueconf_bot-1.2.0b1}/trueconf/filters/base.py +0 -0
  107. {python_trueconf_bot-1.1.8 → python_trueconf_bot-1.2.0b1}/trueconf/filters/command.py +0 -0
  108. {python_trueconf_bot-1.1.8 → python_trueconf_bot-1.2.0b1}/trueconf/filters/instance_of.py +0 -0
  109. {python_trueconf_bot-1.1.8 → python_trueconf_bot-1.2.0b1}/trueconf/filters/message.py +0 -0
  110. {python_trueconf_bot-1.1.8 → python_trueconf_bot-1.2.0b1}/trueconf/filters/method.py +0 -0
  111. {python_trueconf_bot-1.1.8 → python_trueconf_bot-1.2.0b1}/trueconf/loggers.py +0 -0
  112. {python_trueconf_bot-1.1.8 → python_trueconf_bot-1.2.0b1}/trueconf/methods/add_participant_to_chat.py +0 -0
  113. {python_trueconf_bot-1.1.8 → python_trueconf_bot-1.2.0b1}/trueconf/methods/base.py +0 -0
  114. {python_trueconf_bot-1.1.8 → python_trueconf_bot-1.2.0b1}/trueconf/methods/change_participant_role.py +0 -0
  115. {python_trueconf_bot-1.1.8 → python_trueconf_bot-1.2.0b1}/trueconf/methods/create_channel.py +0 -0
  116. {python_trueconf_bot-1.1.8 → python_trueconf_bot-1.2.0b1}/trueconf/methods/create_favorites_chat.py +0 -0
  117. {python_trueconf_bot-1.1.8 → python_trueconf_bot-1.2.0b1}/trueconf/methods/create_group_chat.py +0 -0
  118. {python_trueconf_bot-1.1.8 → python_trueconf_bot-1.2.0b1}/trueconf/methods/create_p2p_chat.py +0 -0
  119. {python_trueconf_bot-1.1.8 → python_trueconf_bot-1.2.0b1}/trueconf/methods/edit_message.py +0 -0
  120. {python_trueconf_bot-1.1.8 → python_trueconf_bot-1.2.0b1}/trueconf/methods/edit_survey.py +0 -0
  121. {python_trueconf_bot-1.1.8 → python_trueconf_bot-1.2.0b1}/trueconf/methods/forward_message.py +0 -0
  122. {python_trueconf_bot-1.1.8 → python_trueconf_bot-1.2.0b1}/trueconf/methods/get_chat_by_id.py +0 -0
  123. {python_trueconf_bot-1.1.8 → python_trueconf_bot-1.2.0b1}/trueconf/methods/get_chat_history.py +0 -0
  124. {python_trueconf_bot-1.1.8 → python_trueconf_bot-1.2.0b1}/trueconf/methods/get_chat_participants.py +0 -0
  125. {python_trueconf_bot-1.1.8 → python_trueconf_bot-1.2.0b1}/trueconf/methods/get_chats.py +0 -0
  126. {python_trueconf_bot-1.1.8 → python_trueconf_bot-1.2.0b1}/trueconf/methods/get_file_info.py +0 -0
  127. {python_trueconf_bot-1.1.8 → python_trueconf_bot-1.2.0b1}/trueconf/methods/get_message_by_id.py +0 -0
  128. {python_trueconf_bot-1.1.8 → python_trueconf_bot-1.2.0b1}/trueconf/methods/get_user_display_name.py +0 -0
  129. {python_trueconf_bot-1.1.8 → python_trueconf_bot-1.2.0b1}/trueconf/methods/has_chat_participant.py +0 -0
  130. {python_trueconf_bot-1.1.8 → python_trueconf_bot-1.2.0b1}/trueconf/methods/remove_chat.py +0 -0
  131. {python_trueconf_bot-1.1.8 → python_trueconf_bot-1.2.0b1}/trueconf/methods/remove_message.py +0 -0
  132. {python_trueconf_bot-1.1.8 → python_trueconf_bot-1.2.0b1}/trueconf/methods/remove_participant_from_chat.py +0 -0
  133. {python_trueconf_bot-1.1.8 → python_trueconf_bot-1.2.0b1}/trueconf/methods/send_file.py +0 -0
  134. {python_trueconf_bot-1.1.8 → python_trueconf_bot-1.2.0b1}/trueconf/methods/send_message.py +0 -0
  135. {python_trueconf_bot-1.1.8 → python_trueconf_bot-1.2.0b1}/trueconf/methods/send_survey.py +0 -0
  136. {python_trueconf_bot-1.1.8 → python_trueconf_bot-1.2.0b1}/trueconf/methods/subscribe_file_progress.py +0 -0
  137. {python_trueconf_bot-1.1.8 → python_trueconf_bot-1.2.0b1}/trueconf/methods/unsubscribe_file_progress.py +0 -0
  138. {python_trueconf_bot-1.1.8 → python_trueconf_bot-1.2.0b1}/trueconf/py.typed +0 -0
  139. {python_trueconf_bot-1.1.8 → python_trueconf_bot-1.2.0b1}/trueconf/types/author_box.py +0 -0
  140. {python_trueconf_bot-1.1.8 → python_trueconf_bot-1.2.0b1}/trueconf/types/chat_participant.py +0 -0
  141. {python_trueconf_bot-1.1.8 → python_trueconf_bot-1.2.0b1}/trueconf/types/content/__init__.py +0 -0
  142. {python_trueconf_bot-1.1.8 → python_trueconf_bot-1.2.0b1}/trueconf/types/content/attachment.py +0 -0
  143. {python_trueconf_bot-1.1.8 → python_trueconf_bot-1.2.0b1}/trueconf/types/content/base.py +0 -0
  144. {python_trueconf_bot-1.1.8 → python_trueconf_bot-1.2.0b1}/trueconf/types/content/chat_created.py +0 -0
  145. {python_trueconf_bot-1.1.8 → python_trueconf_bot-1.2.0b1}/trueconf/types/content/document.py +0 -0
  146. {python_trueconf_bot-1.1.8 → python_trueconf_bot-1.2.0b1}/trueconf/types/content/forward_message.py +0 -0
  147. {python_trueconf_bot-1.1.8 → python_trueconf_bot-1.2.0b1}/trueconf/types/content/photo.py +0 -0
  148. {python_trueconf_bot-1.1.8 → python_trueconf_bot-1.2.0b1}/trueconf/types/content/remove_participant.py +0 -0
  149. {python_trueconf_bot-1.1.8 → python_trueconf_bot-1.2.0b1}/trueconf/types/content/sticker.py +0 -0
  150. {python_trueconf_bot-1.1.8 → python_trueconf_bot-1.2.0b1}/trueconf/types/content/survey.py +0 -0
  151. {python_trueconf_bot-1.1.8 → python_trueconf_bot-1.2.0b1}/trueconf/types/content/text.py +0 -0
  152. {python_trueconf_bot-1.1.8 → python_trueconf_bot-1.2.0b1}/trueconf/types/content/video.py +0 -0
  153. {python_trueconf_bot-1.1.8 → python_trueconf_bot-1.2.0b1}/trueconf/types/last_message.py +0 -0
  154. {python_trueconf_bot-1.1.8 → python_trueconf_bot-1.2.0b1}/trueconf/types/requests/added_chat_participant.py +0 -0
  155. {python_trueconf_bot-1.1.8 → python_trueconf_bot-1.2.0b1}/trueconf/types/requests/changed_participant_role.py +0 -0
  156. {python_trueconf_bot-1.1.8 → python_trueconf_bot-1.2.0b1}/trueconf/types/requests/created_channel.py +0 -0
  157. {python_trueconf_bot-1.1.8 → python_trueconf_bot-1.2.0b1}/trueconf/types/requests/created_favorites_chat.py +0 -0
  158. {python_trueconf_bot-1.1.8 → python_trueconf_bot-1.2.0b1}/trueconf/types/requests/created_group_chat.py +0 -0
  159. {python_trueconf_bot-1.1.8 → python_trueconf_bot-1.2.0b1}/trueconf/types/requests/created_personal_chat.py +0 -0
  160. {python_trueconf_bot-1.1.8 → python_trueconf_bot-1.2.0b1}/trueconf/types/requests/edited_message.py +0 -0
  161. {python_trueconf_bot-1.1.8 → python_trueconf_bot-1.2.0b1}/trueconf/types/requests/removed_chat.py +0 -0
  162. {python_trueconf_bot-1.1.8 → python_trueconf_bot-1.2.0b1}/trueconf/types/requests/removed_chat_participant.py +0 -0
  163. {python_trueconf_bot-1.1.8 → python_trueconf_bot-1.2.0b1}/trueconf/types/requests/removed_message.py +0 -0
  164. {python_trueconf_bot-1.1.8 → python_trueconf_bot-1.2.0b1}/trueconf/types/requests/uploading_progress.py +0 -0
  165. {python_trueconf_bot-1.1.8 → python_trueconf_bot-1.2.0b1}/trueconf/types/responses/add_chat_participant_response.py +0 -0
  166. {python_trueconf_bot-1.1.8 → python_trueconf_bot-1.2.0b1}/trueconf/types/responses/api_error.py +0 -0
  167. {python_trueconf_bot-1.1.8 → python_trueconf_bot-1.2.0b1}/trueconf/types/responses/auth_response_payload.py +0 -0
  168. {python_trueconf_bot-1.1.8 → python_trueconf_bot-1.2.0b1}/trueconf/types/responses/change_participant_role_response.py +0 -0
  169. {python_trueconf_bot-1.1.8 → python_trueconf_bot-1.2.0b1}/trueconf/types/responses/create_channel_response.py +0 -0
  170. {python_trueconf_bot-1.1.8 → python_trueconf_bot-1.2.0b1}/trueconf/types/responses/create_favorites_chat_response.py +0 -0
  171. {python_trueconf_bot-1.1.8 → python_trueconf_bot-1.2.0b1}/trueconf/types/responses/create_group_chat_response.py +0 -0
  172. {python_trueconf_bot-1.1.8 → python_trueconf_bot-1.2.0b1}/trueconf/types/responses/create_p2p_chat_response.py +0 -0
  173. {python_trueconf_bot-1.1.8 → python_trueconf_bot-1.2.0b1}/trueconf/types/responses/edit_message_response.py +0 -0
  174. {python_trueconf_bot-1.1.8 → python_trueconf_bot-1.2.0b1}/trueconf/types/responses/edit_survey_response.py +0 -0
  175. {python_trueconf_bot-1.1.8 → python_trueconf_bot-1.2.0b1}/trueconf/types/responses/forward_message_response.py +0 -0
  176. {python_trueconf_bot-1.1.8 → python_trueconf_bot-1.2.0b1}/trueconf/types/responses/get_chat_by_id_response.py +0 -0
  177. {python_trueconf_bot-1.1.8 → python_trueconf_bot-1.2.0b1}/trueconf/types/responses/get_chat_history_response.py +0 -0
  178. {python_trueconf_bot-1.1.8 → python_trueconf_bot-1.2.0b1}/trueconf/types/responses/get_chat_participants_response.py +0 -0
  179. {python_trueconf_bot-1.1.8 → python_trueconf_bot-1.2.0b1}/trueconf/types/responses/get_chats_response.py +0 -0
  180. {python_trueconf_bot-1.1.8 → python_trueconf_bot-1.2.0b1}/trueconf/types/responses/get_file_info_response.py +0 -0
  181. {python_trueconf_bot-1.1.8 → python_trueconf_bot-1.2.0b1}/trueconf/types/responses/get_message_by_id_response.py +0 -0
  182. {python_trueconf_bot-1.1.8 → python_trueconf_bot-1.2.0b1}/trueconf/types/responses/get_user_display_name_response.py +0 -0
  183. {python_trueconf_bot-1.1.8 → python_trueconf_bot-1.2.0b1}/trueconf/types/responses/has_chat_participant_response.py +0 -0
  184. {python_trueconf_bot-1.1.8 → python_trueconf_bot-1.2.0b1}/trueconf/types/responses/remove_chat_participant_response.py +0 -0
  185. {python_trueconf_bot-1.1.8 → python_trueconf_bot-1.2.0b1}/trueconf/types/responses/remove_chat_response.py +0 -0
  186. {python_trueconf_bot-1.1.8 → python_trueconf_bot-1.2.0b1}/trueconf/types/responses/remove_message_response.py +0 -0
  187. {python_trueconf_bot-1.1.8 → python_trueconf_bot-1.2.0b1}/trueconf/types/responses/send_file_response.py +0 -0
  188. {python_trueconf_bot-1.1.8 → python_trueconf_bot-1.2.0b1}/trueconf/types/responses/send_message_response.py +0 -0
  189. {python_trueconf_bot-1.1.8 → python_trueconf_bot-1.2.0b1}/trueconf/types/responses/send_survey_response.py +0 -0
  190. {python_trueconf_bot-1.1.8 → python_trueconf_bot-1.2.0b1}/trueconf/types/responses/subscribe_file_progress_response.py +0 -0
  191. {python_trueconf_bot-1.1.8 → python_trueconf_bot-1.2.0b1}/trueconf/types/responses/unsubscribe_file_progress_response.py +0 -0
  192. {python_trueconf_bot-1.1.8 → python_trueconf_bot-1.2.0b1}/trueconf/types/responses/upload_file_response.py +0 -0
  193. {python_trueconf_bot-1.1.8 → python_trueconf_bot-1.2.0b1}/trueconf/types/update.py +0 -0
  194. {python_trueconf_bot-1.1.8 → python_trueconf_bot-1.2.0b1}/trueconf/utils/__init__.py +0 -0
  195. {python_trueconf_bot-1.1.8 → python_trueconf_bot-1.2.0b1}/trueconf/utils/generate_secret_for_survey.py +0 -0
  196. {python_trueconf_bot-1.1.8 → python_trueconf_bot-1.2.0b1}/trueconf/utils/token.py +0 -0
@@ -184,4 +184,5 @@ trueconf/_version.py
184
184
  *.DS_Store
185
185
 
186
186
  .venv*
187
- venv*
187
+ venv*
188
+ /gitignore/
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: python-trueconf-bot
3
- Version: 1.1.8
3
+ Version: 1.2.0b1
4
4
  Summary: Lightweight and powerful framework for the TrueConf Server Chatbot API
5
5
  Author-email: TrueConf LLC <info@trueconf.com>, Anton Baadzhi <baadzhianton@gmail.com>
6
6
  License-Expression: BSD-3-Clause-Clear
@@ -31,8 +31,8 @@ Requires-Dist: magic-filter
31
31
  Requires-Dist: aiohttp
32
32
  Requires-Dist: async-property
33
33
  Requires-Dist: typing_extensions>=4.15.0
34
- Provides-Extra: python-magic
35
- Requires-Dist: python-magic>=0.4.27; extra == "python-magic"
34
+ Requires-Dist: python-magic>=0.4.27; sys_platform != "win32"
35
+ Requires-Dist: python-magic-bin>=0.4.27; sys_platform == "win32"
36
36
  Dynamic: license-file
37
37
 
38
38
  <p align="center">
@@ -133,6 +133,51 @@ await bot.download_file_by_id(
133
133
  )
134
134
  ```
135
135
 
136
+ ## Определение MIME-типа с помощью python-magic
137
+
138
+ MIME‑тип файла может определяться автоматически. В библиотеке поддерживаются два подхода:
139
+
140
+ * **По расширению файла** — работает без дополнительных зависимостей, но может быть неточным.
141
+ * **По содержимому файла (bytes)** — заметно точнее, но требует `python-magic`.
142
+
143
+ ### Как это работает
144
+
145
+ Пакет `python-magic` сам по себе MIME‑типы не определяет. Это Python‑обёртка над нативной (C‑шной) библиотекой **libmagic**, которая и выполняет распознавание типа файла по содержимому.
146
+
147
+ Именно поэтому `python-magic` может не работать «из коробки» на некоторых системах: Python‑пакет устанавливается через `pip`, но системная библиотека `libmagic` должна быть установлена отдельно.
148
+
149
+ Если `libmagic` отсутствует, импорт `magic` может завершиться ошибкой вида:
150
+
151
+ * `ImportError: failed to find libmagic. Check your installation`
152
+
153
+ ### Установка
154
+
155
+ Установите системные зависимости:
156
+
157
+ * **macOS (Homebrew):**
158
+
159
+ ```bash
160
+ brew install libmagic
161
+ ```
162
+
163
+ * **Linux (Debian/Ubuntu):**
164
+
165
+ ```bash
166
+ sudo apt install libmagic1
167
+ ```
168
+
169
+ * **Windows:**
170
+
171
+ ```bash
172
+ pip install python-magic-bin
173
+ ```
174
+
175
+ Также рекомендуем ознакомиться с репозиторием [https://github.com/ahupp/python-magic](https://github.com/ahupp/python-magic).
176
+
177
+ ### Примечания
178
+
179
+ * При наличии `python-magic` MIME‑тип определяется **по байтам файла**, что обычно точнее, чем определение по имени или расширению.
180
+
136
181
 
137
182
 
138
183
 
@@ -49,12 +49,10 @@ dependencies = [
49
49
  "aiohttp",
50
50
  "async-property",
51
51
  "typing_extensions>=4.15.0",
52
+ "python-magic>=0.4.27 ; sys_platform != 'win32'",
53
+ "python-magic-bin>=0.4.27 ; sys_platform == 'win32'",
52
54
  ]
53
55
 
54
- [project.optional-dependencies]
55
- python-magic = ["python-magic>=0.4.27"]
56
-
57
-
58
56
  [tool.setuptools]
59
57
  packages = ["trueconf"]
60
58
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: python-trueconf-bot
3
- Version: 1.1.8
3
+ Version: 1.2.0b1
4
4
  Summary: Lightweight and powerful framework for the TrueConf Server Chatbot API
5
5
  Author-email: TrueConf LLC <info@trueconf.com>, Anton Baadzhi <baadzhianton@gmail.com>
6
6
  License-Expression: BSD-3-Clause-Clear
@@ -31,8 +31,8 @@ Requires-Dist: magic-filter
31
31
  Requires-Dist: aiohttp
32
32
  Requires-Dist: async-property
33
33
  Requires-Dist: typing_extensions>=4.15.0
34
- Provides-Extra: python-magic
35
- Requires-Dist: python-magic>=0.4.27; extra == "python-magic"
34
+ Requires-Dist: python-magic>=0.4.27; sys_platform != "win32"
35
+ Requires-Dist: python-magic-bin>=0.4.27; sys_platform == "win32"
36
36
  Dynamic: license-file
37
37
 
38
38
  <p align="center">
@@ -101,6 +101,7 @@ trueconf/methods/create_channel.py
101
101
  trueconf/methods/create_favorites_chat.py
102
102
  trueconf/methods/create_group_chat.py
103
103
  trueconf/methods/create_p2p_chat.py
104
+ trueconf/methods/edit_chat_title.py
104
105
  trueconf/methods/edit_message.py
105
106
  trueconf/methods/edit_survey.py
106
107
  trueconf/methods/forward_message.py
@@ -109,6 +110,7 @@ trueconf/methods/get_chat_history.py
109
110
  trueconf/methods/get_chat_participants.py
110
111
  trueconf/methods/get_chats.py
111
112
  trueconf/methods/get_file_info.py
113
+ trueconf/methods/get_file_upload_limits.py
112
114
  trueconf/methods/get_message_by_id.py
113
115
  trueconf/methods/get_user_display_name.py
114
116
  trueconf/methods/has_chat_participant.py
@@ -135,6 +137,7 @@ trueconf/types/content/base.py
135
137
  trueconf/types/content/chat_created.py
136
138
  trueconf/types/content/document.py
137
139
  trueconf/types/content/forward_message.py
140
+ trueconf/types/content/location.py
138
141
  trueconf/types/content/photo.py
139
142
  trueconf/types/content/remove_participant.py
140
143
  trueconf/types/content/sticker.py
@@ -143,11 +146,13 @@ trueconf/types/content/text.py
143
146
  trueconf/types/content/video.py
144
147
  trueconf/types/requests/__init__.py
145
148
  trueconf/types/requests/added_chat_participant.py
149
+ trueconf/types/requests/changed_file_upload_limits.py
146
150
  trueconf/types/requests/changed_participant_role.py
147
151
  trueconf/types/requests/created_channel.py
148
152
  trueconf/types/requests/created_favorites_chat.py
149
153
  trueconf/types/requests/created_group_chat.py
150
154
  trueconf/types/requests/created_personal_chat.py
155
+ trueconf/types/requests/edited_chat_title.py
151
156
  trueconf/types/requests/edited_message.py
152
157
  trueconf/types/requests/removed_chat.py
153
158
  trueconf/types/requests/removed_chat_participant.py
@@ -162,6 +167,7 @@ trueconf/types/responses/create_channel_response.py
162
167
  trueconf/types/responses/create_favorites_chat_response.py
163
168
  trueconf/types/responses/create_group_chat_response.py
164
169
  trueconf/types/responses/create_p2p_chat_response.py
170
+ trueconf/types/responses/edit_chat_title_response.py
165
171
  trueconf/types/responses/edit_message_response.py
166
172
  trueconf/types/responses/edit_survey_response.py
167
173
  trueconf/types/responses/forward_message_response.py
@@ -170,6 +176,7 @@ trueconf/types/responses/get_chat_history_response.py
170
176
  trueconf/types/responses/get_chat_participants_response.py
171
177
  trueconf/types/responses/get_chats_response.py
172
178
  trueconf/types/responses/get_file_info_response.py
179
+ trueconf/types/responses/get_file_upload_limits_response.py
173
180
  trueconf/types/responses/get_message_by_id_response.py
174
181
  trueconf/types/responses/get_user_display_name_response.py
175
182
  trueconf/types/responses/has_chat_participant_response.py
@@ -7,5 +7,8 @@ aiohttp
7
7
  async-property
8
8
  typing_extensions>=4.15.0
9
9
 
10
- [python-magic]
10
+ [:sys_platform != "win32"]
11
11
  python-magic>=0.4.27
12
+
13
+ [:sys_platform == "win32"]
14
+ python-magic-bin>=0.4.27
@@ -18,7 +18,7 @@ version_tuple: tuple[int | str, ...]
18
18
  commit_id: str | None
19
19
  __commit_id__: str | None
20
20
 
21
- __version__ = version = '1.1.8'
22
- __version_tuple__ = version_tuple = (1, 1, 8)
21
+ __version__ = version = '1.2.0b1'
22
+ __version_tuple__ = version_tuple = (1, 2, 0, 'b1')
23
23
 
24
- __commit_id__ = commit_id = 'g3398e0444'
24
+ __commit_id__ = commit_id = 'gdc2498caa'
@@ -39,6 +39,7 @@ from trueconf.methods.create_channel import CreateChannel
39
39
  from trueconf.methods.create_favorites_chat import CreateFavoritesChat
40
40
  from trueconf.methods.create_group_chat import CreateGroupChat
41
41
  from trueconf.methods.create_p2p_chat import CreateP2PChat
42
+ from trueconf.methods.edit_chat_title import EditChatTitle
42
43
  from trueconf.methods.edit_message import EditMessage
43
44
  from trueconf.methods.edit_survey import EditSurvey
44
45
  from trueconf.methods.forward_message import ForwardMessage
@@ -47,6 +48,7 @@ from trueconf.methods.get_chat_history import GetChatHistory
47
48
  from trueconf.methods.get_chat_participants import GetChatParticipants
48
49
  from trueconf.methods.get_chats import GetChats
49
50
  from trueconf.methods.get_file_info import GetFileInfo
51
+ from trueconf.methods.get_file_upload_limits import GetFileUploadLimits
50
52
  from trueconf.methods.get_message_by_id import GetMessageById
51
53
  from trueconf.methods.get_user_display_name import GetUserDisplayName
52
54
  from trueconf.methods.has_chat_participant import HasChatParticipant
@@ -62,12 +64,14 @@ from trueconf.methods.upload_file import UploadFile
62
64
  from trueconf.types.input_file import InputFile, URLInputFile
63
65
  from trueconf.types.parser import parse_update
64
66
  from trueconf.types.requests.uploading_progress import UploadingProgress
67
+ from trueconf.types.responses import GetFileUploadLimitsResponse
65
68
  from trueconf.types.responses.add_chat_participant_response import AddChatParticipantResponse
66
69
  from trueconf.types.responses.change_participant_role_response import ChangeParticipantRoleResponse
67
70
  from trueconf.types.responses.create_channel_response import CreateChannelResponse
68
71
  from trueconf.types.responses.create_favorites_chat_response import CreateFavoritesChatResponse
69
72
  from trueconf.types.responses.create_group_chat_response import CreateGroupChatResponse
70
73
  from trueconf.types.responses.create_p2p_chat_response import CreateP2PChatResponse
74
+ from trueconf.types.responses.edit_chat_title_response import EditChatTitleResponse
71
75
  from trueconf.types.responses.edit_message_response import EditMessageResponse
72
76
  from trueconf.types.responses.edit_survey_response import EditSurveyResponse
73
77
  from trueconf.types.responses.forward_message_response import ForwardMessageResponse
@@ -109,6 +113,7 @@ class Bot:
109
113
  verify_ssl: bool = True,
110
114
  dispatcher: Dispatcher | None = None,
111
115
  receive_unread_messages: bool = False,
116
+ receive_system_messages: bool = False,
112
117
  ):
113
118
  """
114
119
  Initializes a TrueConf chatbot instance with WebSocket connection and configuration options.
@@ -125,6 +130,7 @@ class Bot:
125
130
  verify_ssl (bool, optional): Whether to verify the server's SSL certificate. Defaults to True.
126
131
  dispatcher (Dispatcher | None, optional): Dispatcher instance for registering handlers.
127
132
  receive_unread_messages (bool, optional): Whether to receive unread messages on connection. Defaults to False.
133
+ receive_system_messages (bool, optional): Whether to receive system messages on connection. Defaults to False.
128
134
 
129
135
  Note:
130
136
  Alternatively, you can authorize using a username and password via the `from_credentials()` class method.
@@ -146,6 +152,7 @@ class Bot:
146
152
  self._protocol = "https" if self.https else "http"
147
153
  self.port = 443 if self.https else self.web_port
148
154
  self.receive_unread_messages = receive_unread_messages
155
+ self.receive_system_messages = receive_system_messages
149
156
  self._url_for_upload_files = (
150
157
  f"{self._protocol}://{self.server}:{self.port}/bridge/api/client/v1/files"
151
158
  )
@@ -217,6 +224,7 @@ class Bot:
217
224
  password: str,
218
225
  dispatcher: Dispatcher | None = None,
219
226
  receive_unread_messages: bool = False,
227
+ receive_system_messages: bool = False,
220
228
  verify_ssl: bool = True,
221
229
  **token_opts: Unpack[TokenOpts],
222
230
  ) -> Self:
@@ -232,6 +240,7 @@ class Bot:
232
240
  password (str): Password for authentication.
233
241
  dispatcher (Dispatcher | None, optional): Dispatcher instance for registering handlers.
234
242
  receive_unread_messages (bool, optional): Whether to receive unread messages on connection. Defaults to False.
243
+ receive_system_messages (bool, optional): Whether to receive system messages on connection. Defaults to False.
235
244
  verify_ssl (bool, optional): Whether to verify the server's SSL certificate. Defaults to True.
236
245
  **token_opts: Additional options passed to the token request, such as `web_port` and `https`.
237
246
 
@@ -246,13 +255,14 @@ class Bot:
246
255
  if not token:
247
256
  raise RuntimeError("Failed to obtain token")
248
257
  return cls(
249
- server,
250
- token,
251
- web_port=token_opts.get("web_port", 443),
252
- https=token_opts.get("https", True),
258
+ server=server,
259
+ token=token,
253
260
  dispatcher=dispatcher,
254
261
  receive_unread_messages=receive_unread_messages,
262
+ receive_system_messages=receive_system_messages,
255
263
  verify_ssl=verify_ssl,
264
+ web_port=token_opts.get("web_port", 443),
265
+ https=token_opts.get("https", True),
256
266
  )
257
267
 
258
268
  async def __wait_upload_complete(
@@ -290,7 +300,7 @@ class Bot:
290
300
  dest_path: str | Path | None = None,
291
301
  timeout: int = 60,
292
302
  chunk_size: int = 64 * 1024,
293
- ) -> Path | None:
303
+ ) -> bytes | None:
294
304
 
295
305
  """
296
306
  Asynchronously download file by URL and save it to disk.
@@ -308,23 +318,24 @@ class Bot:
308
318
  Path | None: Path to saved file, or None on error.
309
319
  """
310
320
 
311
- if dest_path is None:
312
- tmp = tempfile.NamedTemporaryFile(prefix="tc_dl_", suffix=file_name, delete=False)
313
- dest = Path(tmp.name)
314
- tmp.close()
315
- else:
316
- dest = Path(dest_path) / file_name
317
- dest.parent.mkdir(parents=True, exist_ok=True)
318
-
319
321
  try:
320
322
  async with httpx.AsyncClient(verify=self.verify_ssl, timeout=httpx.Timeout(timeout)) as client:
321
323
  async with client.stream("GET", url) as resp:
322
324
  resp.raise_for_status()
323
- async with aiofiles.open(dest, "wb") as f:
325
+ if dest_path is None:
326
+ chunks = []
324
327
  async for chunk in resp.aiter_bytes(chunk_size):
325
- if chunk:
328
+ chunks.append(chunk)
329
+ return b"".join(chunks)
330
+
331
+ else:
332
+ dest = Path(dest_path) / file_name
333
+ dest.parent.mkdir(parents=True, exist_ok=True)
334
+
335
+ async with aiofiles.open(dest, "wb") as f:
336
+ async for chunk in resp.aiter_bytes(chunk_size):
326
337
  await f.write(chunk)
327
- return dest
338
+ return None
328
339
  except Exception as e:
329
340
  loggers.chatbot.error(f"Failed to download file from {url}: {e}")
330
341
  with contextlib.suppress(Exception):
@@ -371,7 +382,7 @@ class Bot:
371
382
  if preview:
372
383
  await preview.prepare()
373
384
 
374
- res = await self(UploadFile(file_size=file.file_size))
385
+ res = await self(UploadFile(file_size=file.file_size, file_name=file.file_name))
375
386
  upload_task_id = res.upload_task_id
376
387
 
377
388
  headers = {
@@ -395,16 +406,16 @@ class Bot:
395
406
  data.add_field(
396
407
  name="file",
397
408
  value= await file.read(),
398
- filename=file.filename,
399
- content_type="sticker/webp" if is_sticker else file.mimetype,
409
+ filename=file.file_name,
410
+ content_type="sticker/webp" if is_sticker else file.mime_type,
400
411
  )
401
412
 
402
413
  if preview:
403
414
  data.add_field(
404
415
  name="preview",
405
416
  value = await preview.read(),
406
- filename=preview.filename,
407
- content_type=preview.mimetype
417
+ filename=preview.file_name,
418
+ content_type=preview.mime_type
408
419
  )
409
420
 
410
421
  async with session.post(self._url_for_upload_files, headers=headers, data=data) as response:
@@ -492,7 +503,9 @@ class Bot:
492
503
  loggers.chatbot.info("🚀 Starting authorization")
493
504
 
494
505
  call = AuthMethod(
495
- token=self.__token, receive_unread_messages=self.receive_unread_messages
506
+ token=self.__token,
507
+ receive_unread_messages=self.receive_unread_messages,
508
+
496
509
  )
497
510
  loggers.chatbot.info(f"🛠 Created AuthMethod with id={call.id}")
498
511
  result = await self(call)
@@ -782,6 +795,35 @@ class Bot:
782
795
  dest_path=dest_path
783
796
  )
784
797
 
798
+ async def edit_chat_title(self, chat_id: str, title: str) -> EditChatTitleResponse:
799
+ """
800
+ Updates the display title of the specified chat.
801
+
802
+ Use this method to set a new visible name for a chat (e.g., a group chat or channel).
803
+
804
+ Notes:
805
+ Requires TrueConf Server 5.5.3 or later.
806
+ The bot must have sufficient permissions in the chat (e.g., owner or admin/moderator).
807
+
808
+ Source:
809
+ https://trueconf.com/docs/chatbot-connector/en/chats/#editChatTitle
810
+
811
+ Args:
812
+ chat_id (str): Identifier of the chat whose title should be updated.
813
+ title (str): New title for the chat.
814
+
815
+ Returns:
816
+ EditChatTitleResponse: Object containing the result of the title update.
817
+
818
+ Example:
819
+ ```python
820
+ await bot.edit_chat_title(chat_id="a1s2d3f4f5g6", title="Project Alpha – Team")
821
+ ```
822
+ """
823
+
824
+ call = EditChatTitle(chat_id=chat_id, title=title)
825
+ return await self(call)
826
+
785
827
  async def edit_message(
786
828
  self, message_id: str, text: str, parse_mode: ParseMode | str = ParseMode.TEXT
787
829
  ) -> EditMessageResponse:
@@ -976,6 +1018,33 @@ class Bot:
976
1018
  call = GetFileInfo(file_id=file_id)
977
1019
  return await self(call)
978
1020
 
1021
+ async def get_file_info_upload_limits(self) -> GetFileUploadLimitsResponse:
1022
+ """
1023
+ Returns the current file upload limits configured on the TrueConf Server.
1024
+
1025
+ Useful for validating outgoing files in advance (e.g., checking maximum
1026
+ file size and allowed types/extensions).
1027
+
1028
+ Notes:
1029
+ Requires TrueConf Server 5.5.3 or later.
1030
+
1031
+ Source:
1032
+ https://trueconf.com/docs/chatbot-connector/en/files/#getFileUploadLimits
1033
+
1034
+ Returns:
1035
+ GetFileUploadLimitsResponse: Object describing upload constraints
1036
+ (e.g., maximum file size, allowed types/extensions).
1037
+
1038
+ Example:
1039
+ ```python
1040
+ limits = await bot.get_file_info_upload_limits()
1041
+ # Use `limits` fields to validate a file before uploading
1042
+ ```
1043
+ """
1044
+
1045
+ call = GetFileUploadLimits()
1046
+ return await self(call)
1047
+
979
1048
  async def get_message_by_id(
980
1049
  self, message_id: str
981
1050
  ) -> GetMessageByIdResponse:
@@ -1340,7 +1409,7 @@ class Bot:
1340
1409
  ```
1341
1410
  """
1342
1411
 
1343
- if file.mimetype != "image/webp":
1412
+ if file.mime_type != "image/webp":
1344
1413
  raise TypeError("File type not supported. File type must be 'image/webp'")
1345
1414
 
1346
1415
  loggers.chatbot.info(f"✉️ Sending file to {chat_id}")
@@ -10,11 +10,13 @@ from trueconf.filters.instance_of import InstanceOfFilter
10
10
  from trueconf.filters.method import MethodFilter
11
11
  from trueconf.types.message import Message
12
12
  from trueconf.types.requests.added_chat_participant import AddedChatParticipant
13
+ from trueconf.types.requests.changed_file_upload_limits import ChangedFileUploadLimits
13
14
  from trueconf.types.requests.changed_participant_role import ChangedParticipantRole
14
15
  from trueconf.types.requests.created_channel import CreatedChannel
15
16
  from trueconf.types.requests.created_favorites_chat import CreatedFavoritesChat
16
17
  from trueconf.types.requests.created_group_chat import CreatedGroupChat
17
18
  from trueconf.types.requests.created_personal_chat import CreatedPersonalChat
19
+ from trueconf.types.requests.edited_chat_title import EditedChatTitle
18
20
  from trueconf.types.requests.edited_message import EditedMessage
19
21
  from trueconf.types.requests.removed_chat import RemovedChat
20
22
  from trueconf.types.requests.removed_chat_participant import RemovedChatParticipant
@@ -4,10 +4,12 @@ from enum import Enum
4
4
  class IncomingUpdateMethod(str, Enum):
5
5
  ADDED_CHAT_PARTICIPANT = "addChatParticipant"
6
6
  CHANGED_PARTICIPANT_ROLE = "changeParticipantRole"
7
+ CHANGED_FILE_UPLOAD_LIMITS = "getFileUploadLimits"
7
8
  CREATED_CHANNEL = "createChannel"
8
9
  CREATED_GROUP_CHAT = "createGroupChat"
9
10
  CREATED_PERSONAL_CHAT = "createP2PChat"
10
11
  CREATED_FAVORITES_CHAT = "createFavoritesChat"
12
+ EDITED_CHAT_TITLE = "editChatTitle"
11
13
  EDITED_MESSAGE = "editMessage"
12
14
  REMOVED_CHAT_PARTICIPANT = "removeChatParticipant"
13
15
  REMOVED_MESSAGE = "removeMessage"
@@ -12,10 +12,14 @@ class MessageType(int, Enum):
12
12
 
13
13
  ADD_PARTICIPANT = 1
14
14
  REMOVE_PARTICIPANT = 2
15
+ EDIT_CHAT_TITLE = 21
16
+ EDIT_CHAT_AVATAR = 22
17
+ CLEAR_CHAT_HISTORY = 23
15
18
  PARTICIPANT_ROLE = 110
16
19
  PLAIN_MESSAGE = 200
17
20
  FORWARDED_MESSAGE = 201
18
21
  ATTACHMENT = 202
22
+ LOCATION = 203
19
23
  SURVEY = 204
20
24
 
21
25
  async def __call__(self, event: Any) -> bool:
@@ -6,6 +6,7 @@ from trueconf.methods.base import TrueConfMethod
6
6
  from .create_channel import CreateChannel
7
7
  from .create_group_chat import CreateGroupChat
8
8
  from .create_p2p_chat import CreateP2PChat
9
+ from .edit_chat_title import EditChatTitle
9
10
  from .edit_message import EditMessage
10
11
  from .edit_survey import EditSurvey
11
12
  from .forward_message import ForwardMessage
@@ -37,6 +38,7 @@ __all__ = [
37
38
  'ForwardMessage',
38
39
  'SendMessage',
39
40
  'CreateChannel',
41
+ 'EditChatTitle',
40
42
  'EditMessage',
41
43
  'GetChatHistory',
42
44
  'GetChatParticipants',
@@ -12,6 +12,7 @@ class AuthMethod(TrueConfMethod[AuthResponsePayload]):
12
12
  token: str
13
13
  tokenType: str = "JWT"
14
14
  receive_unread_messages: bool = False
15
+ receive_system_messages: bool = False
15
16
 
16
17
  def __post_init__(self):
17
18
  super().__init__()
@@ -20,6 +21,6 @@ class AuthMethod(TrueConfMethod[AuthResponsePayload]):
20
21
  return {
21
22
  "token": self.token,
22
23
  "tokenType": self.tokenType,
23
- "receiveUnread": self.receive_unread_messages
24
-
24
+ "receiveUnread": self.receive_unread_messages,
25
+ "receiveSystemMessageEnvelopes": self.receive_system_messages
25
26
  }
@@ -0,0 +1,22 @@
1
+ from __future__ import annotations
2
+ from dataclasses import dataclass
3
+ from trueconf.methods.base import TrueConfMethod
4
+ from trueconf.types.responses.edit_chat_title_response import EditChatTitleResponse
5
+
6
+
7
+ @dataclass
8
+ class EditChatTitle(TrueConfMethod[EditChatTitleResponse]):
9
+ __api_method__ = "editChatTitle"
10
+ __returning__ = EditChatTitleResponse
11
+
12
+ chat_id: str
13
+ title: str
14
+
15
+ def __post_init__(self):
16
+ super().__init__()
17
+
18
+ def payload(self):
19
+ return {
20
+ "chatId": self.chat_id,
21
+ "title": self.title,
22
+ }
@@ -0,0 +1,16 @@
1
+ from __future__ import annotations
2
+ from dataclasses import dataclass
3
+ from trueconf.methods.base import TrueConfMethod
4
+ from trueconf.types.responses import GetFileUploadLimitsResponse
5
+
6
+ @dataclass
7
+ class GetFileUploadLimits(TrueConfMethod[GetFileUploadLimitsResponse]):
8
+ __api_method__ = "getFileUploadLimits"
9
+ __returning__ = GetFileUploadLimitsResponse
10
+
11
+ def __post_init__(self):
12
+ super().__init__()
13
+
14
+ def payload(self):
15
+ return {
16
+ }
@@ -11,6 +11,7 @@ class UploadFile(TrueConfMethod[UploadFileResponse]):
11
11
  __returning__ = UploadFileResponse
12
12
 
13
13
  file_size: int
14
+ file_name: str
14
15
 
15
16
  def __post_init__(self):
16
17
  super().__init__()
@@ -18,4 +19,5 @@ class UploadFile(TrueConfMethod[UploadFileResponse]):
18
19
  def payload(self):
19
20
  return {
20
21
  "fileSize": self.file_size,
22
+ "fileName": self.file_name,
21
23
  }
@@ -1,9 +1,11 @@
1
1
  from .message import Message
2
2
  from .requests.added_chat_participant import AddedChatParticipant
3
+ from .requests.changed_file_upload_limits import ChangedFileUploadLimits
3
4
  from .requests.changed_participant_role import ChangedParticipantRole
4
5
  from .requests.created_channel import CreatedChannel
5
6
  from .requests.created_group_chat import CreatedGroupChat
6
7
  from .requests.created_personal_chat import CreatedPersonalChat
8
+ from .requests.edited_chat_title import EditedChatTitle
7
9
  from .requests.edited_message import EditedMessage
8
10
  from .requests.removed_chat import RemovedChat
9
11
  from .requests.removed_chat_participant import RemovedChatParticipant
@@ -18,10 +20,12 @@ from .input_file import URLInputFile
18
20
 
19
21
  __all__ = [
20
22
  "AddedChatParticipant",
23
+ "ChangedFileUploadLimits",
21
24
  "ChangedParticipantRole",
22
25
  "CreatedChannel",
23
26
  "CreatedGroupChat",
24
27
  "CreatedPersonalChat",
28
+ "EditedChatTitle",
25
29
  "EditedMessage",
26
30
  "Message",
27
31
  "RemovedChat",
@@ -0,0 +1,10 @@
1
+ from __future__ import annotations
2
+ from dataclasses import dataclass, field
3
+ from trueconf.types.content.base import AbstractEnvelopeContent
4
+
5
+
6
+ @dataclass
7
+ class Location(AbstractEnvelopeContent):
8
+ latitude: float
9
+ longitude: float
10
+ title: str