Add config setting controlling if a self-introduction message is posted after joining a room

Fixes https://github.com/etkecc/baibot/issues/32
This commit is contained in:
Slavi Pantaleev
2025-02-26 20:30:02 +02:00
parent 1ff7e8cf79
commit c051da2f4a
7 changed files with 49 additions and 0 deletions

View File

@@ -8,6 +8,12 @@ pub async fn handle(
room: &mxlink::matrix_sdk::Room,
room_config_context: &RoomConfigContext,
) -> anyhow::Result<()> {
if !bot.post_join_self_introduction_enabled() {
tracing::debug!("Post-join self-introduction is disabled - not sending introduction message");
return Ok(());
}
let agent_manager = bot.agent_manager();
bot.messaging()