This bot demonstrates how to join and participate in MLS (Messaging Layer Security) group conversations using the Vector SDK. It handles both private direct messages and group messages, automatically responding with "Hello World" to any message it receives.
- Handles private direct messages
- Joins MLS group conversations when invited
- Responds to group messages with "Hello World"
- Demonstrates MLS group messaging functionality
- Rust toolchain (stable version)
- Cargo package manager
- vector_sdk
- tokio
To start the bot, use the following command from the repository root:
cargo run --manifest-path=Group/JoinAndSayHello/Cargo.toml --bin join_and_say_helloOr navigate to the project directory and run:
cd Group/JoinAndSayHello
cargo runThe bot uses a hardcoded private key for demonstration purposes. In production, you should:
- Generate your own keys using
Keys::generate() - Store the private key securely
- Use environment variables or configuration files for sensitive data
- The bot initializes with a specific private key
- It listens for gift-wrapped messages (encrypted invitations)
- When it receives a private direct message, it responds with "Hello World"
- When it receives an MLS group welcome message, it joins the group
- When it receives a group message, it responds with "Hello World"
main.rs: Main entry point containing the bot logicCargo.toml: Project dependencies and configuration
Contributions are welcome! Please feel free to submit issues or pull requests.
This project is licensed under the MIT License. See the LICENSE file for details.