Skip to content

Commit

Permalink
feat: update pybotx
Browse files Browse the repository at this point in the history
  • Loading branch information
kutuzov13 committed Dec 28, 2024
1 parent a907f45 commit 13d1ef9
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app/bot/commands/credentials.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ async def add_credentials_handler(message: IncomingMessage, bot: Bot) -> None:

# Normally bot accounts doesn't added on the fly
bot._bot_accounts_storage._bot_accounts.append( # noqa: WPS437
BotAccountWithSecret(id=bot_id, host=host, secret_key=secret_key)
BotAccountWithSecret(cts_host=bot_id, host=host, secret_key=secret_key)
)

await bot.answer_message("Credentials was added")
2 changes: 1 addition & 1 deletion app/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def _build_credentials_from_string(
host, secret_key, bot_id = [
str_value.strip() for str_value in credentials_str.split("@")
]
return BotAccountWithSecret(host=host, secret_key=secret_key, id=UUID(bot_id))
return BotAccountWithSecret(cts_url=host, secret_key=secret_key, id=UUID(bot_id))


settings = AppSettings()
2 changes: 1 addition & 1 deletion pybotx-submodule
Submodule pybotx-submodule updated 50 files
+2 −1 .github/workflows/python-app.yml
+41 −1 README.md
+161 −154 poetry.lock
+34 −2 pybotx/__init__.py
+163 −20 pybotx/bot/bot.py
+4 −4 pybotx/bot/bot_accounts_storage.py
+8 −0 pybotx/bot/handler.py
+82 −20 pybotx/bot/handler_collector.py
+2 −3 pybotx/client/botx_method.py
+5 −0 pybotx/client/smartapps_api/exceptions.py
+99 −0 pybotx/client/smartapps_api/smartapp_manifest.py
+68 −0 pybotx/client/smartapps_api/smartapp_unread_counter.py
+40 −1 pybotx/client/users_api/user_from_csv.py
+37 −0 pybotx/client/users_api/user_from_search.py
+9 −0 pybotx/logger.py
+22 −3 pybotx/models/bot_account.py
+6 −0 pybotx/models/commands.py
+16 −2 pybotx/models/enums.py
+8 −1 pybotx/models/message/forward.py
+3 −0 pybotx/models/message/incoming_message.py
+59 −2 pybotx/models/message/markup.py
+148 −0 pybotx/models/sync_smartapp_event.py
+57 −0 pybotx/models/system_events/chat_deleted_by_user.py
+18 −2 pybotx/models/system_events/event_edit.py
+4 −4 pybotx/models/system_events/smartapp_event.py
+47 −0 pybotx/models/users.py
+5 −6 pyproject.toml
+3 −2 setup.cfg
+125 −0 tests/client/notifications_api/test_markup.py
+198 −0 tests/client/smartapps_api/test_smartapp_manifest.py
+66 −0 tests/client/smartapps_api/test_smartapp_unread_counter.py
+46 −0 tests/client/test_botx_method.py
+117 −0 tests/client/users_api/conftest.py
+9 −0 tests/client/users_api/convert_to_datetime.py
+42 −23 tests/client/users_api/test_search_user_by_email.py
+44 −25 tests/client/users_api/test_search_user_by_emails.py
+42 −23 tests/client/users_api/test_search_user_by_huid.py
+43 −23 tests/client/users_api/test_search_user_by_login.py
+42 −24 tests/client/users_api/test_search_user_by_other_id.py
+29 −7 tests/client/users_api/test_users_as_csv.py
+108 −2 tests/conftest.py
+20 −0 tests/models/test_bot_account.py
+1 −1 tests/models/test_markup.py
+90 −0 tests/system_events/test_chat_deleted_by_user.py
+5 −2 tests/system_events/test_event_edit.py
+118 −0 tests/test_base_command.py
+143 −3 tests/test_end_to_end.py
+54 −1 tests/test_handler_collector.py
+3 −0 tests/test_incoming_message.py
+122 −1 tests/test_verify_request.py

0 comments on commit 13d1ef9

Please sign in to comment.