Skip to contents

Send a message to a mattermost server

Usage

alert_mattermost(
  msg,
  server,
  hook,
  user = "nono",
  channel = NULL,
  alert = TRUE
)

Arguments

msg

character, the message to be sent. Each element is a considered as a line.

server

character, the address of the mattermost server.

hook

character, the ID of the webhook defined in the mattermost server.

user

character, the name of the user.

channel

character, the ID of the channel. Default to NULL, in that case, the default channel defined at mattermost server level fot the webhook will be used.

alert

logical, should the alert be send to the mattermost server.

Value

If alert is FALSE, the command generated to send the message.

Examples


if (FALSE) { # \dontrun{
msg = "Ceci est un test !"
hook = "nf71q9d5u7dwxmpygz75gpqyqr"
server = "https://mattermost.g-eau.fr"
alert_mattermost(msg, server, hook)
} # }