Return the ID of the appservice that was created by register_appservice
This commit is contained in:
parent
78502aa6b1
commit
28d3b348d2
2 changed files with 6 additions and 7 deletions
|
@ -110,13 +110,10 @@ impl Admin {
|
|||
}
|
||||
AdminCommand::RegisterAppservice(yaml) => {
|
||||
match guard.appservice.register_appservice(yaml) {
|
||||
Ok(Some(id)) => {
|
||||
Ok(id) => {
|
||||
let msg: String = format!("OK. Appservice {} created", id);
|
||||
send_message(RoomMessageEventContent::text_plain(msg), guard, &state_lock);
|
||||
}
|
||||
Ok(None) => {
|
||||
send_message(RoomMessageEventContent::text_plain("WARN. Appservice created, but its ID was not returned!"), guard, &state_lock);
|
||||
}
|
||||
Err(_) => {
|
||||
send_message(RoomMessageEventContent::text_plain("ERR: Failed register appservice. Check server log"), guard, &state_lock);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue