Closed jjh74 closed 3 years ago
You're right this is a bug. The fix is to use the Alert.from_action()` method like so ...
alert.from_action(action, text='status changed via MS Teams webhook')
If you can submit a PR for this that would be great. I've already fixed Telegram and Slack.
Issue Summary MSTeams, telegram (and probably Slack) webhook sets alert.set_status from action:
When action is 'close' status is also set to 'close'. I think with action 'close' the status should be set to 'closed' (not 'close') (https://docs.alerta.io/en/latest/api/alert.html#alert-status). AFAIK webui doesn't show status='close' if you filter for 'Closed' alerts (webui shows 'close' alerts if you remove all filters).
So I think the webhooks should do something like this:
If this seems reasonable I can create a patch for this.