Use notice instead of normal message.

- This should avoid notifications in clients.
master
Robert Jacob 4 years ago
parent e0860c728b
commit 8698169e0a
  1. 6
      matrix/matrix.go

@ -61,7 +61,7 @@ func Listener(storage *spaceapi.Storage, homeServer, userID, token, room string)
switch body {
case txt.CommandHelp:
if _, err := cli.SendText(room, txt.HelpMessage); err != nil {
if _, err := cli.SendNotice(room, txt.HelpMessage); err != nil {
log.Printf("Error sending message: %s", err)
}
case txt.CommandState:
@ -77,7 +77,7 @@ func Listener(storage *spaceapi.Storage, homeServer, userID, token, room string)
}
}
if _, err := cli.SendText(room, msg); err != nil {
if _, err := cli.SendNotice(room, msg); err != nil {
log.Printf("Error sending message: %s", err)
}
case txt.CommandClose, txt.CommandClosed:
@ -110,7 +110,7 @@ func Listener(storage *spaceapi.Storage, homeServer, userID, token, room string)
msg = txt.TransitionToClosed
}
if _, err := cli.SendText(room, msg); err != nil {
if _, err := cli.SendNotice(room, msg); err != nil {
log.Printf("Error sending Matrix message: %s", err)
}
}, nil

Loading…
Cancel
Save