forked from trinitrix/core
Fix(handlers::command): Only send success on real success
The `room_message_send()` function told the user about a successful sent room message, even if that was not the case.
This commit is contained in:
parent
f7b161fb55
commit
a80245c523
|
@ -112,12 +112,12 @@ pub async fn handle(
|
|||
Command::RoomMessageSend(msg) => {
|
||||
if let Some(room) = app.status.room_mut() {
|
||||
room.send(msg.clone()).await?;
|
||||
send_status_output!("Sent message: `{}`", msg);
|
||||
} else {
|
||||
// TODO(@Soispha): Should this raise a lua error? It could be very confusing,
|
||||
// when a user doesn't read the log.
|
||||
warn!("Can't send message: `{}`, as there is no open room!", &msg);
|
||||
}
|
||||
send_status_output!("Send message: `{}`", msg);
|
||||
EventStatus::Ok
|
||||
}
|
||||
Command::Greet(name) => {
|
||||
|
|
Loading…
Reference in New Issue