Add (dis|re)connect commands and provision api

Also fixed a number of data races.
This commit is contained in:
Gary Kramlich
2022-02-22 07:56:15 -06:00
parent d883befee5
commit 4b87ea1cc7
8 changed files with 287 additions and 110 deletions

View File

@@ -101,7 +101,12 @@ func (h *commandHandler) handle(roomID id.RoomID, user *User, message string, re
if err != nil {
h.log.Warnf("Command %q failed: %v", message, err)
cmd.globals.reply("unexpected failure")
output := buf.String()
if output != "" {
cmd.globals.reply(output)
} else {
cmd.globals.reply("unexpected failure")
}
return
}