Previously, when only a subset of alerts in a group resolves, the program will post the message as if all alerts in the group are firing. This is incorrect.
This PR changes the behavior such that resolved alerts are displayed as resolved.
The source of the problem is that the program is currently only looking at the "common" status of the alerts, not at the individual alerts' status. This PR changes that by first sorting the alerts into lists based on their status, and then sending individual messages for each of the lists.
Previously, when only a subset of alerts in a group resolves, the program will post the message as if all alerts in the group are firing. This is incorrect. This PR changes the behavior such that resolved alerts are displayed as resolved.
The source of the problem is that the program is currently only looking at the "common" status of the alerts, not at the individual alerts' status. This PR changes that by first sorting the alerts into lists based on their status, and then sending individual messages for each of the lists.