diff --git a/CHANGELOG.md b/CHANGELOG.md index 065b12e..671f035 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,17 @@ All notable changes to this project are documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [1.3.1] + +### Fixed +- In group chats the bot no longer replies "I don't know how to read files or + videos" to videos and documents it wasn't mentioned in — `unsupport_message_handle` + now respects the same `is_bot_mentioned` check as the other handlers (#454). + +### Security +- Bumped `python-dotenv` 1.0.1 → 1.2.2 to resolve a symlink-following advisory in + `set_key` (Dependabot). + ## [1.3.0] ### Removed diff --git a/VERSION b/VERSION index f0bb29e..3a3cd8c 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.3.0 +1.3.1 diff --git a/bot/bot.py b/bot/bot.py index 04ac0e5..b1dce2d 100644 --- a/bot/bot.py +++ b/bot/bot.py @@ -329,6 +329,10 @@ async def _vision_message_handle_fn( return async def unsupport_message_handle(update: Update, context: CallbackContext, message=None): + # check if bot was mentioned (for group chats) + if not await is_bot_mentioned(update, context): + return + error_text = f"I don't know how to read files or videos. Send the picture in normal mode (Quick Mode)." logger.error(error_text) await update.message.reply_text(error_text) diff --git a/requirements.txt b/requirements.txt index 85c522e..fbfc44b 100644 --- a/requirements.txt +++ b/requirements.txt @@ -3,4 +3,4 @@ openai>=1.40.0,<2.0.0 tiktoken>=0.7.0 PyYAML==6.0.2 pymongo==4.6.3 -python-dotenv==1.0.1 +python-dotenv==1.2.2