Log Matrix messages
This commit is contained in:
parent
3836ad8094
commit
38c1240998
@ -110,16 +110,25 @@ async fn room_message_handler(
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
let command = &text_content
|
||||||
|
.body
|
||||||
|
.trim_start_matches(&state.display_name)
|
||||||
|
.trim_start_matches(":")
|
||||||
|
.trim()
|
||||||
|
.to_string();
|
||||||
|
log_message(
|
||||||
|
Matrix,
|
||||||
|
&format!(
|
||||||
|
"Executing command from {}: {}",
|
||||||
|
event.sender.to_string(),
|
||||||
|
command
|
||||||
|
),
|
||||||
|
);
|
||||||
log_error(
|
log_error(
|
||||||
room.send(
|
room.send(
|
||||||
RoomMessageEventContent::text_plain(
|
RoomMessageEventContent::text_plain(
|
||||||
&crate::bot::process_command(
|
&crate::bot::process_command(
|
||||||
&text_content
|
&command,
|
||||||
.body
|
|
||||||
.trim_start_matches(&state.display_name)
|
|
||||||
.trim_start_matches(":")
|
|
||||||
.trim()
|
|
||||||
.to_string(),
|
|
||||||
&event.sender.to_string(),
|
&event.sender.to_string(),
|
||||||
&mut client,
|
&mut client,
|
||||||
bot_state.clone(),
|
bot_state.clone(),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user