List of Changes⚓︎
1.5.4⚓︎
Added:
- The
Message.forwarded_messageproperty — the original of a forwarded message - The
max_sizeparameter inURLInputFile.read()— aborts the download withFileSizeTooLargeErrorwhen the content exceeds the limit
Fixed:
- Parsing of forwarded messages (type
201):ForwardMessageinherits fromMessageand gains all its parameters —text,voice,document,reply_message,bindand others; nested forwards are resolved recursively. A forwarded voice message no longer drops the whole update withInvalidFieldValue getChatHistory: thefromMessageIdparameter is no longer sent asnull— it caused the399 WRONG_PAYLOAD_FORMATserver errorURLInputFile: the file size is now computed from the actually downloaded body. Sources that return a new file per request (e.g. camera snapshots) led to400 Bad Request: the size was taken from the headers of one response while the body of another was uploadedURLInputFile: redirecting URLs and servers rejecting HEAD requests are handled correctly; an error response (e.g. 404) is no longer treated as the file with the error-page size
Changed:
URLInputFile.prepare()reads only HTTP headers and does not download the body;Content-Lengthis treated as an estimate. The exact size becomes known after the download and is the size declared to the server- One
URLInputFileobject corresponds to one content: repeated sends andclone()reuse the downloaded bytes. Need a fresh file (e.g. a new camera frame) — create a new object read(max_size=...)aborts the download when the limit is exceeded; thebot.max_file_sizelimit now applies to URL files as well- Metadata completeness (a non-empty name + size) is now guaranteed by the file classes themselves:
URLInputFileresolves the name inprepare()(otherwiseFileUploadError),BufferedInputFileandFSInputFilereject an emptyfile_name(TypeError/ValueError) Message.boxis now optional — a forwarded message carries nobox
1.5.3⚓︎
Fixed:
- Connect task cancellation in Python 3.10: an external cancellation (
task.cancel()) now propagates to the caller - The
httpx2dependency is back to>=2.7.0(previously>=2.13.0) - Tests are wired into GitHub Actions; CI updated: actions moved to Node 24,
setup-uvpinned to v10.2.0, caching added
1.5.2⚓︎
Added:
- Python 3.14 support declared
Fixed:
- The version compatibility table in README
1.5.1⚓︎
Added:
- Version compatibility check: TrueConf Server 5.5.3–5.5.5 requires
python-trueconf-bot >=1.2.1,<1.5.0(with an install hint)
Fixed:
- The version compatibility table in README
1.5.0⚓︎
🚀 Major release! This is not only a set of new features, but also extensive work on stability.
Tip
Support for Python 3.10 ends on 31.10.2026, together with the end of its official support by the Python Software Foundation.
Added:
- Support for incoming voice messages with the
MessageType.VOICE_MESSAGE(205) type - Support for inline buttons via
InlineKeyboardMarkup/InlineKeyboardButton(actions: command, URL, message, copy). Requires TrueConf Server 5.5.6 and TrueConf client apps for Windows, macOS and Linux version 8.6.0, TrueConf for Android 3.3.0, TrueConf for iOS 4.2.0 - Callback queries for handling button presses: the
@router.callback_query()handler,callback_query.edit_message(...)andcallback_query.answer(...)shortcuts - Buttons with
wait_reply=Trueand theanswerCommandmethod temporarily raiseNotImplementedError: the functionality is supported by TrueConf Server but awaits support from client applications. Once it becomes available, a new release will be published that removes this limitation - Chat object: the
chatfield with theChatmodel inMessageandLastMessage - Message replies: incoming reply messages now include
Message.reply_messagewith the content of the original message being replied to - System messages: the
SystemMessagemodel and the@router.system_message()handler - Reply with a quote via the
quoteparameter inMessage.reply()andBot.send_message(), as well as theMessage.quoteproperty - Chat activity indicator: the
Bot.send_chat_activity()method, theChatActivityenum and theChatActivitySender.typing(...)context manager - In-memory file download size limit via the
max_in_memory_download_sizeparameter - The
LineBreaknode intrueconf.utils.formatting(<br>for HTML,\nfor Markdown) - The
message.locationandmessage.contactshortcuts for geolocation and contacts (vCard files and trueconf links) - OAuth2 authentication via
Bot.from_oauth()for servers with login/password authentication disabled. Requires TrueConf Server 5.5.3+ - New exceptions:
WSConnectionError,InMemoryDownloadLimitExceededError,FileUploadError,OAuthMissingScopeError,PasswordAuthDisabledError - Text descriptions for API error codes (399, 400–408) in
ApiError.message(). Codes 400–408 relate to files and replace the single generic code 310 (“error while sending”) — now it is clear what exactly went wrong during the send - The
caption_message_idfield inSendFileResponse— the ID of the caption message sent with a file; allows changing the file caption viaedit_message(...) - A custom
User-Agenton all library requests in the formatpython-trueconf-bot/<version> (Python/<version>; <OS>/<release>), e.g.:python-trueconf-bot/1.5.0 (Python/3.12.4; Darwin/24.0.0)
Changed:
- The
Underlinenode intrueconf.utils.formattingnow also renders in Markdown (__text__) — previously underline worked only in HTML markup - File download: the
file_pathparameter sets the exact output path, parent directories are created automatically - The
mimetypeparameter was renamed tomime_type ws_max_retries/ws_max_delaybehavior: once the attempts are exhausted, the connection ends withWSConnectionError- Bot shutdown now waits for running handlers and closes the WebSocket transport; a
timeoutparameter was added toshutdown() - The HTTP client was migrated from
httpxtohttpx2
Fixed:
- Parsing of system messages in chat history and API responses
- File upload errors: the caller now receives
FileUploadErrorwith the original cause - Infinite WebSocket reconnection after the retry limit is exhausted
- The WebSocket connection was not closed on bot shutdown — the session now properly closes the attached socket
- Download URLs and tokens no longer appear in logs in full: the query string is stripped from URLs (
https://server/.../files/download?token=...→https://server/.../files/download), and tokens in debug logs are truncated to the last 30 characters - Token acquisition in
Bot.from_credentials()now respects thehttpsandweb_portparameters — previously the token was always requested via https:443, even if the server runs on http or a non-standard port
Deprecated:
- The
Message.chat_idproperty — usemessage.chat.chat_idinstead - The
dest_pathparameter — usefile_pathinstead (will be removed in version 2.0) - The
mimetypeparameter — usemime_typeinstead
1.4.4⚓︎
Fixed:
- Fixed a library (bot) crash occurring when the LastMessage contained a notification about a chat avatar change #15.
1.4.3⚓︎
Fixed:
- Checking server version. Currently, the check is performed via the API first; if an error occurs, the check is based on the TrueConf service status.
1.4.2⚓︎
Fixed:
- Bot crash when server version field is empty
1.4.1⚓︎
Added:
- New parameter
timeoutin classBotandBot.from_credentials()method
Fixed:
- System events like
ChangedFileUploadLimitsdon't have chat_id or author, which causedDefaultKeyBuilderto raiseRuntimeError. NowFSMMiddlewarechecks forchat_id/user_idbefore building FSM context. System events pass through without FSM context.
Refactor:
- Improve network timeout logic for file download and upload:
- Remove hardcoded
chunk_sizefromhttpx.streamto prevent false ReadTimeout on slow networks. - Configure
aiohttp.ClientTimeoutusingsock_readinstead oftotalto allow long file uploads without socket freezes. - Enforce strict
int | floattypes for timeouts, removing redundantNonechecks - Update method docstrings to clearly reflect adaptive timeout behavior.
- Remove hardcoded
1.4.0⚓︎
Added:
- FSM (Finite State Machine) — a finite state machine mechanism. It allows you to implement step-by-step dialogs, such as questionnaires, forms, and setup wizards.
States are declared declaratively usingStatesGroup/State, while data is stored inFSMContext. It supports nested groups, multiple storage strategies, and state-based filtering viaStateFilter. Learn more: FSM. - Middleware — a layer for processing events before and after handlers.
It allows you to log events, block them, check access, and modify data.
It supports two types: outer middleware, which runs before filters, and inner middleware, which runs after filters. Learn more: Middleware. - The
skip_self_messagesparameter inBot(). By default, it is set toTrue, so the bot automatically ignores messages sent by itself.
It can be disabled withskip_self_messages=False. - Added
Message.reply_message, containing the full message being replied to. - Added the
SystemMessagemodel for system Envelopes in live updates and chat history, together with the@router.system_message()handler.
Fixed:
- The history-clearing notification now preserves
for_allas the server-providedboolvalue.
1.3.0⚓︎
Added:
- Added a health-check mechanism for tracking the bot connection state:
- push model via the
Bot(on_health_check=func_callback)callback, which is called when the connection status changes; - pull model via the
bot.health_check()method, which returns the current bot state; connected,authorized, anddisconnectedstatuses.
- push model via the
- Added
bot.me_idsupport for storing the authorized bot identifier. - Added the
message.mentionshortcut, which returnsTrueif the current bot is mentioned in the message or if@allis used. - Added the
trueconf.utils.formattingmodule for convenient HTML/Markdown message construction with classes:Text,Bold,Italic,Underline,Strikethrough,Link,Mention,AllMention. - Added the
truststoredependency for working with the system trusted certificate store. - Added the
SSLVerifytype for unified typing of theverify_sslparameter:bool | str | ssl.SSLContext. - Added the
bot.me_chatproperty as the new name for getting thechat_idof the "Favorites" chat.
Changed:
- Updated the
verify_sslbehavior:verify_ssl=Trueuses the system trusted certificate store throughtruststore;verify_ssl=Falsedisables certificate verification;verify_ssl="/path/to/ca.pem"uses a custom CA bundle;verify_ssl=ssl.SSLContext(...)uses the provided SSL context.
- Updated the SSL logic for WebSocket connections: a single
self.ssl_context, created viabuild_ssl_context(...), is now used. - Updated bot initialization logging: logs now include human-readable information about the SSL context.
Fixed:
- Fixed failures caused by incomplete certificate chains. Certificate chains can now be verified successfully by using the system trusted certificate store through
truststoreor by passing a custom SSL context.
Deprecated:
- The asynchronous
bot.meproperty, which returns thechat_idof the "Favorites" chat, is now deprecated. Useawait bot.me_chatinstead.
Documentation:
- Added Context7 AI Assistant: interactive support for code and documentation.
- Added a new Sending messages documentation section covering:
- getting
chat_id; - sending text messages via
bot.send_message(...); - replying with
reply_message_id; - forwarding messages via
bot.forward_message(...); - text formatting via
trueconf.utils.formatting; - the 4096-character message length limit and using
safe_split_text(...).
- getting
- Added health-check documentation covering:
- push model via callback;
- pull model via
bot.health_check(); - an example of combined usage with an HTTP health endpoint.
- Added and updated docstrings for the formatting module,
Message.mention,verify_ssl, and the health-check API. - Added new sections: Shortcuts, Restrictions, Formatting, Exceptions.
1.2.3⚓︎
Added:
- Added a 10-second server response timeout. If no response is received within the timeout, an
asyncio.TimeoutErroris raised:Request to {self.__api_method__} timed out after {timeout}s(#12).
Fixed:
- Fixed cases where Mashumaro failed to parse a response, which could cause the application to crash (#8, #11).
1.2.2⚓︎
Fixed:
- Fixed a missing dependency: the
packagingpackage, which is required to check the library version at bot startup.
1.2.1⚓︎
Added:
- Added support for TrueConf Server 5.5.4.
- Added the
receive_system_messagesflag toBot()andBot.from_credentials()to enable or disable receiving system messages. - Added the new
bot.get_chat_participant()method, which replacesbot.has_chat_participant().
Fixed:
- Fixed support for TrueConf Server 5.5.3+. Removed an unnecessary version check that prevented the code from running with library version 1.2.0.
- Fixed documentation links to
llms.txtandllms-full.txt.
Changed:
- When retrieving file information via
bot.get_file_info(file_id=...), the response now returns thefile_idfield instead ofinfo_hash.
Deprecated:
- The
bot.has_chat_participant()method has been deprecated. Usebot.get_chat_participant()instead.
1.2.0⚓︎
Added:
- Added support for TrueConf Server 5.5.3, including:
- chat title editing with
bot.edit_chat_title(...); - chat avatar editing with
bot.edit_chat_avatar(...); - chat history clearing with
bot.clear_chat_history(...); - retrieving file storage limits with
bot.get_file_info_upload_limits(...); - a new file transfer approach where the
file_nameparameter is now required forFSInputFile(...)and other file upload methods. - Added caching for file storage limit settings. These settings are now used for pre-upload validation, and the library raises an exception if a file does not meet the configured constraints.
- Added
python-magicandfiletypelibraries for more reliable file type detection based on magic numbers (byte signatures). - Added automatic file extension appending when a filename does not contain an extension.
- Improved WebSocket connection stability with exponential backoff and a configurable retry strategy. You can control the maximum number of reconnection attempts with
ws_max_retriesand the maximum delay between attempts withws_max_delay(#6). - Added TrueConf Server version validation. The library now raises a
RuntimeErrorwith upgrade instructions if an incompatible server version is detected. - Added the
safe_split_textutility for safely splitting long messages exceeding 4096 characters into chunks of up to 4096 characters. This is especially useful for AI agents that generate long responses. - Added AI-friendly documentation builds:
llms.txtandllms-full.txt. - Added and expanded logging.
Fixed:
- Fixed an issue with sending stickers in TrueConf Server 5.5.3+.
- Fixed issue #7.
- Fixed various minor bugs and made general improvements.
Deprecated:
- The
filenameandmimetypeparameters are now deprecated. - Please migrate to the new
snake_caseparameter naming, as the old parameters will be removed in future versions.
1.1.10⚓︎
Fixed:
- Fixed the missing
file_idparameter inSendFileResponse.
1.1.9⚓︎
Added:
- Added TrueConf Server version validation. The library now raises a
RuntimeErrorwith update instructions if an incompatible server version is detected.
1.1.8⚓︎
Fixed:
- Added
verify_sslsupport for WSS connections. Previously, SSL verification was unconditionally bypassed whenhttpswas enabled; it is now correctly controlled by the configuration flag.
1.1.7⚓︎
Added:
- Added
reply_photo,reply_document, andreply_stickershortcut methods to theMessageclass. - Added
reply_message_idsupport to multiple methods and to theSendFileclass.
Fixed:
- Fixed
quote_fieldsbeing set toFalseinaiohttp.FormData. - Set the default value of
last_messagetoNoneinGetChatByIdResponse(fixes #4).
Deprecated:
reply_messageis now deprecated. Usereply_message_idinstead.
1.1.6⚓︎
Refactored:
- Replaced local
verify_sslusage withself.verify_sslin class methods.
1.1.5⚓︎
Fixed:
- Prevented
run()from hanging when the connect task fails. - Properly propagate
ApiErrorExceptionand other errors to the caller.
1.1.4⚓︎
Fixed:
- Removed the
chat_idfield fromRemoveChatResponse(#1).
1.1.3⚓︎
Fixed:
- Fixed event propagation for multiple routers and subrouters.
1.1.2⚓︎
Added:
- Bumped the development status.
- Added
typing_extensionsto dependencies. - Added and updated the downloads badge.
- Added imports for
SelfandUnpackfromtyping_extensions.
Fixed:
- Fixed
Messageshortcuts not working.
1.1.1⚓︎
Added:
- New classes for working with files:
FSInputFile,BufferedInputFile,URLInputFile. More details can be found in the documentation. - Support for displaying message history
display_history = Truewhen adding a user to a group chat or channel. - Support for request and event for:
- role changes in a group chat or channel (request, notification);
- creation of the “Favorites” chat (request, notification).
- Ability to send files with a caption.
- Shortcut
.save_to_favorites()for quickly saving a message to the "Favorites" chat. - The asynchronous property
await bot.me, which returns thechat_idof the "Saved Messages" chat.
Fixed:
- Stickers sent via
bot.send_sticker()were displayed with a background due to an incorrect MIME type. - The method
.remove_participant_from_chat()did not work when an incomplete TrueConf ID was specified. - Error unpacking the participant list due to an incorrect alias.
- Sometimes, when obtaining a token using
.from_credentials(), a400 Bad Requestserror would occur when using a digit password.
Modified:
- The
bot.server_nameproperty has become asynchronous. Use it asawait bot.server_name.
1.0.0⚓︎
🎉 First Release!
- Stable version of the python-trueconf-bot library.
- Support for all major TrueConf ChatBot API methods.
- Aliases and keyboard shortcuts in the aiogram style (message.answer, message.reply, etc.).
- Asynchronous data transmission via the WebSocket protocol.
- Working with files (sending and uploading).
- Documentation: trueconf.github.io/python-trueconf-bot/
- PyPI: pypi.org/project/python-trueconf-bot/