backend.utils.mattermost
- backend.utils.mattermost.send_mm_message(text, webhook='https://your-mattermost-instance.com/hooks/xxx', channel=None)[Quellcode]
Send a message to a Mattermost channel via an Incoming Webhook.
- Parameter:
- Rückgabe:
Trueon success.- Rückgabetyp:
- Verursacht:
ValueError – If webhook is empty/
Noneor text isNone.TypeError – If text or channel are not strings.
requests.exceptions.HTTPError – If the Mattermost server returns a non-2xx status code.