Browse Source

CommandEvent.Reply: Send all messages to management room

Because the Bridge Bot doesn't participate in the rooms it can't send any
messages to this room. Hence, we should send all replies to the management
room.
Jörg Sommer 6 years ago
parent
commit
da5e399333
1 changed files with 1 additions and 1 deletions
  1. 1 1
      commands.go

+ 1 - 1
commands.go

@@ -52,7 +52,7 @@ type CommandEvent struct {
 
 
 // Reply sends a reply to command as notice
 // Reply sends a reply to command as notice
 func (ce *CommandEvent) Reply(msg string) {
 func (ce *CommandEvent) Reply(msg string) {
-	_, err := ce.Bot.SendNotice(string(ce.RoomID), msg)
+	_, err := ce.Bot.SendNotice(string(ce.User.ManagementRoom), msg)
 	if err != nil {
 	if err != nil {
 		ce.Handler.log.Warnfln("Failed to reply to command from %s: %v", ce.User.MXID, err)
 		ce.Handler.log.Warnfln("Failed to reply to command from %s: %v", ce.User.MXID, err)
 	}
 	}