Sends a confirmation message to the user once an application
is submitted, thanking them and advising them to wait for
moderator review. Enhances user experience by providing clarity
and reassurance about the submission process.
Switch resolve_room_id to an async call in command handling to prevent blocking operations and enhance performance. This change ensures the bot can handle room ID resolutions non-blockingly, particularly during monitoring and protection operations. It improves the overall responsiveness and reliability of the bot when processing commands that require room ID resolution.
Adjusted the command parsing logic to require a space after "monitor," ensuring proper extraction of the room ID from the user input. This change enhances command reliability and prevents misinterpretations that could lead to incorrect room monitoring behavior.
Adjusted mention handling logic to split the username at the colon, ensuring correct comparison for command processing. This prevents false positives when the username contains additional information post-colon.
Ensure that the bot commands are recognized regardless of the letter casing of the mention. This improves command compatibility and user experience by allowing flexibility in how the bot is invoked. Prior to this change, commands were case-sensitive, potentially leading to inconsistencies in command recognition.
Add error handling for room state updates when setting monitored and protected rooms. Log errors and send a notification to the operator room if the update fails. This ensures that failures don't silently occur, providing better feedback and fault management.
Wrapped command handling in a try-except block to log errors and notify users of failures in processing commands. Updated the error message for the protect command, and included responses for invalid or unauthorized commands. This enhances robustness and improves user feedback. Adjustments ensure all exceptions are caught, improving usability and maintainability.
Enhanced user feedback for 'monitor', 'unmonitor', 'protect', and 'unprotect' commands by sending messages confirming action status in target rooms. Improved clarity and logging for potential errors such as missing room IDs. Provides users with immediate notification of their command's effect, facilitating better user interaction and error handling.
Streamlined command handling by decoupling the bot's prefix from commands, reducing redundancy. Commands are now directly matched after splitting the prefix. This change enhances readability, maintains clarity, and potentially reduces command parsing errors. It also ensures commands are processed more consistently. This update should not affect current usage but may facilitate future extensions to command handling rules.
Implemented a more robust method for resolving room IDs in bot commands by introducing a `resolve_room_id` function. This helps handle room aliases and formats gracefully, minimizing errors when monitoring, protecting, or unprotecting rooms. This change improves user experience by ensuring accurate room identification based on different input formats. Also added the `resolve_alias` function to assist in resolving room aliases to IDs. Fixes issue with incorrect room handling when commands used aliases or non-standard room identifiers.
Updated the command prefix from `!supportbot` to `!applicationbot` to ensure consistent naming across the application, thereby avoiding user confusion. This change applies to all related commands including help, open ticket, invite, close, approve, reject, list, monitor, unmonitor, and protected room actions. This refactor aims to improve clarity and maintain a coherent command structure for users interacting with the bot.
Improved error handling for the protect command by logging an error message when a room ID is missing, preventing potential crashes from an IndexError. Also, updated ticket naming convention to use "Application" for better clarity.
Removed the unused import statements for `RoomGetEventResponse` and `MegolmEvent` to improve code readability and maintainability. Unused imports can lead to confusion and unnecessarily inflate the codebase. This cleanup also aids in preventing potential import-related issues in the future.
Added customer notification when a moderator invites themselves to a ticket room, improving transparency and communication. Corrected parameter for inviting operators to ensure proper user identification. Fixed room state update targeting, enhancing data accuracy.
Updated the reaction processing mechanism to fetch user and ticket IDs directly from room state events instead of extracting them from messages. This streamlines and improves the robustness of the approval, rejection, and invitation workflows in the application bot. State storage for message-to-ticket mapping was also added to facilitate this process.
Updated the bot's reactions to be sent to the operator room rather than the user room to ensure that all reactions are correctly coordinated with operations. Removed redundant logging for cleaner output. This change is aimed at improving the message handling accuracy and operational efficiency.
Changed the message type check from `RoomMessageText` to `RoomSendResponse` for accurate handling of sent message responses regarding emoji reactions. This ensures appropriate logging and message processing in compliance with expected response types.
Ensure that the bot ignores "!apply" commands sent by itself to avoid unnecessary processing and potential loops. Also, add logging for message reactions to aid in debugging and monitoring.
Revises method signatures to directly utilize the `event` object rather than individual message components, streamlining event processing for command and message relays. This change enhances code clarity and maintains consistency across methods.
The bot now ignores reactions from itself, preventing redundant logging and processing. Added functionality to automatically react with approval, pending, and rejection emojis to messages in the operator room. This enhances user interaction and streamlines the application review process.
Changed the `reaction_callback` method to access reaction event contents through `event.source["content"]` instead of `event.content`. This update addresses issues with data access during reaction handling, preventing potential errors. Added debug logging for improved tracing of reaction events.
Improved error logs by including the event type when a message relay fails. This aids in debugging by providing more context about the nature of the error.
Include the sender's name in bot notifications to enhance user communication. Introduce exception handling and logging when relaying messages to improve debugging and reliability.
Introduce emoji reaction handling in the application bot to streamline member application decisions. The bot now processes reactions "🟢" to approve, "🔴" to reject, and "🟡" to invite users to operator rooms, automating user management. This enhancement reduces manual intervention and improves efficiency.
Introduced a callback to handle reaction events in the bot. This enhancement improves user interaction by allowing the bot to respond to reactions, broadening its capability beyond basic message and member events. No impact on existing functionality.
Added messages to notify the operator room when user invitation or kick actions fail, improving operator awareness. Included notifications to both the monitored and operator rooms when a room starts being monitored, enhancing transparency. Updated ticket terminology to "application" to better reflect the context. Also, added notification to customers when a moderator wishes to join their room, improving user interaction. This enhances clarity and communication efficiency within the application bot's operations.
Refactored command handling methods to return awaitables directly rather than awaiting them in place. This approach facilitates easier testing and future integration with event loop management strategies. Improves asynchronous function chaining and consistent handling of command execution results.
Refactor the ApplicationBot's methods for enhanced readability. This includes reformatting multiline structures and improving code consistency by adjusting indentation and ensuring uniform string formatting. These changes do not alter functionality but streamline future maintenance and readability. No functional impact or changes to logic were made.
Introduced a `help_command` method to provide users and operators with a list of available commands specific to their roles. This enhancement improves user experience by offering quick access to critical command information directly within the chat environment.
Replaced occurrences of "ticket" with "application" within bot messages to better reflect the system's functionality focused on application processing rather than ticket management. This change clarifies the user instructions and aligns the terminology with the application's purpose. No functional behavior modifications were made.
Update project name and metadata from matrix-supportbot to
matrix-applicationbot to reflect new functionality of handling
space application requests. This includes changes in package
names, author information, and repository URLs to align with
the project's new identity. This helps avoid confusion and
provides clarity on the bot's purpose.
Renamed the bot from "SupportBot" to "ApplicationBot" to reflect expanded functionality including room application management. Updated README to specify the fork's purpose and extended the bot with features like automated ticket creation for new members, application processing, and command handling for room monitoring and user access management. This enhances the bot's use case by supporting room access applications alongside support tickets.
Enhanced the README with additional status badges for easier access to:
- Matrix community link
- PyPI package version and Python compatibility
- License information
- Latest Git commit
These additions improve visibility and accessibility of relevant project details for users and contributors.
Adjusted ticket ID extraction to handle commands with three parts instead of two, ensuring proper ticket closure functionality. Updated project version to 0.1.2 to reflect the fix.
Expanded the README with comprehensive details about the bot's
capabilities, including its features, user and operator commands,
installation steps, and usage instructions. This enhances clarity
for new users and contributors on how to interact with and set
up the bot effectively.
Added dist/ directory to .gitignore to prevent distribution files from being tracked by Git. This keeps the repository clean and avoids unnecessary clutter from build artifacts.
Enhanced the bot's functionality with several improvements:
- Added YAML dependency for configuration loading
- Introduced detailed logging for better monitoring
- Implemented invite event handling and operator check
- Updated error handling and user feedback messages
- Ensured the bot ignores its own messages
Increased the version to 0.1.1 to reflect these changes.
- Set up CI/CD workflow for Python package publishing to PyPI
- Add MIT License for project
- Create .gitignore file to exclude common Python and project files
- Document project purpose and licensing in README.md
- Add example configuration file (config.yaml.dist)
- Define package metadata and dependencies in pyproject.toml
- Implement SupportBot class for handling support tickets in Matrix
- Implement main script for bot execution and configuration loading
This initial commit establishes the structure and core functionality for the Matrix Support Bot project.