Commit graph

19 commits

Author SHA1 Message Date
94bcd8bdd4
chore: bump version to 0.1.2
All checks were successful
Python Package CI/CD / Publish to PyPI (push) Successful in 1m11s
Incremented the project version from 0.1.1 to 0.1.2 to reflect recent updates and improvements. This minor version bump helps ensure clarity in tracking changes and maintaining semantic versioning integrity.
2024-08-27 15:39:10 +02:00
e557e20cbe
feat: add lock and unlock user commands
Introduced `!roomba lock <user_id>` and `!roomba unlock <user_id>` commands to manage user access. These commands enable locking and unlocking user accounts via Matrix bot, enhancing moderation capabilities. Updated help message to reflect new commands.
2024-08-27 15:38:46 +02:00
3c08c748b4
fix(bot): handle whitespace in command input
Updated the command parser to correctly process non-empty inputs by checking if the event body contains a command, even with leading or trailing spaces. This prevents misinterpretations of valid commands with extra spaces and ensures the bot responds appropriately.
2024-08-17 18:22:07 +02:00
68bf718285
refactor(workflow): remove setup and test job
Eliminated redundant setup and test job from the release workflow to streamline the release process.
2024-08-17 15:51:04 +02:00
d5880f9a2c
chore: bump version to 0.1.1
Some checks failed
Python Package CI/CD / Publish to PyPI (push) Successful in 1m13s
Python Package CI/CD / Setup and Test (push) Failing after 11m57s
Incremented the project version from 0.1.0 to 0.1.1 to reflect recent bug fixes and minor adjustments. This version update ensures compatibility with downstream dependencies and communicates stability improvements.
2024-08-17 15:45:18 +02:00
8c1e5c33dc
refactor(bot): rename main function for clarity
Renamed `main` to `main_async` to better reflect its asynchronous nature.
Introduced a new `main` function that runs the async function within the event loop. This refactor improves code readability and better distinguishes between the synchronous entry point and the primary asynchronous logic.
2024-08-17 15:44:54 +02:00
6d62dc99c8
feat: introduce CI/CD workflow and packaging setup
Added Forgejo Actions workflow for Python package CI/CD, enabling automated testing and deployment to PyPI upon new tags. Introduced README and LICENSE files to document and license the project. Set up project with pyproject.toml, specifying dependencies, build system, and scripts. Configured .gitignore to exclude build artifacts.

Helps automate deployment and set a structured foundation for the project.
2024-08-17 15:36:04 +02:00
cfd985a746
refactor: call get_local_users before session deletion
Moved the call to get_local_users before the asynchronous HTTP session deletion to ensure user data is fetched prior to initiating the room shutdown process. This change improves the structure of the asynchronous operations and ensures local users information is available for logging and messaging promptly.
2024-08-17 15:21:25 +02:00
4e0bc7a84b
fix(docs): correct grammar in configuration instructions
Adjusted the grammar in the configuration instructions to improve clarity. Ensured instructions explicitly state that credentials should come directly from the user's homeserver, aiding user comprehension and preventing setup errors.
2024-08-09 12:12:40 +02:00
7bfcda09b8
feat(bot): add initial sync before continuous sync
Added an initial sync with a timeout of 30000ms before starting continuous synchronization to ensure the bot is ready with the latest state from the server. This change aims to prevent any missed messages that might occur during the startup phase.
2024-08-09 11:53:31 +02:00
a9ca33c77b
feat(bot): add read markers upon command execution
Mark events as read in the moderation room after handling commands.
Enhances user feedback by visually confirming command reception.
2024-08-09 11:44:46 +02:00
798fcc361e
fix(bot): handle missing shutdown config keys
Set default values for `shutdown_title` and `shutdown_message` if they are not present in the config. This prevents potential errors when these keys are missing, ensuring smoother bot initialization.
2024-08-09 11:43:34 +02:00
dc73ef6700
feat: add room shutdown functionality with custom messages
Introduced the ability to shutdown rooms with an optional purge option.
Users can now specify custom shutdown titles and messages. This enhances
the bot's ability to handle content violations more effectively and
communicate actions clearly to users.

- Added shutdown_title and shutdown_message parameters.
- Implemented shutdown_room method to manage room shutdowns.
- Updated command handler to recognize "!roomba shutdown" with "--purge".
2024-08-09 11:42:26 +02:00
519adeb16e
fix(bot.py): correct indentation of send_message method
Fixed the indentation of the send_message method within the RoombaBot class. The incorrect indentation caused the method to be misaligned, possibly resulting in an AttributeError. This ensures the method is properly defined and callable within the class.
2024-08-09 11:13:08 +02:00
eadc4d7791
fix(bot): separate user_id from client creation
Removed user_id from the AsyncClient constructor and set it separately on the client object. This change ensures that the user_id is consistently assigned regardless of the homeserver type, improving maintainability and clarity of client configuration.
2024-08-09 11:11:56 +02:00
e0f3408b5c
feat: add Pantalaimon support for encrypted rooms
Added optional parameters to initialize RoombaBot with Pantalaimon's homeserver and token to handle encrypted rooms. Updated configuration to include these new options. This enhancement allows secure moderation of encrypted rooms using Pantalaimon.
2024-08-09 11:01:58 +02:00
309e4968c3
fix: handle unknown commands and correct async indentation errors
Added a response for unknown commands to guide users on valid usage, improving user experience and preventing misuse. Fixed indentation for async functions to ensure correct code execution. These changes address issues with command handling and function performance.
2024-08-07 12:22:17 +02:00
840ae90376
feat: include local user details in block/unblock messages
Added functionality to retrieve and include local user details
in block/unblock room messages for clarity. Implemented a new
method to fetch local users in a room by their IDs, enhancing
the feedback provided to moderators.
2024-08-07 10:41:21 +02:00
504e2399cc
feat: add RoombaBot for blocking/unblocking Matrix rooms
Introduced RoombaBot to manage room blocking/unblocking via commands.
Configured logging for better traceability of bot actions. Added
config.dist.yaml to provide a template for configuration setup.
Updated .gitignore to exclude virtual environments and unnecessary files.

This bot listens to specific commands in a moderation room and uses
Matrix administration APIs to block or unblock specified rooms.
2024-08-07 10:28:30 +02:00