feat(notifications): add support for default notifications

ref #5883
This commit is contained in:
bergquist
2016-09-05 21:33:05 +02:00
parent eb0396ad95
commit c893e5d241
10 changed files with 89 additions and 57 deletions

View File

@@ -88,11 +88,12 @@ func (n *RootNotifier) uploadImage(context *EvalContext) error {
}
func (n *RootNotifier) getNotifiers(orgId int64, notificationIds []int64) ([]Notifier, error) {
query := &m.GetAlertNotificationsQuery{OrgId: orgId}
if len(notificationIds) == 0 {
return []Notifier{}, nil
query.Ids = []int64{0}
}
query := &m.GetAlertNotificationsQuery{OrgId: orgId, Ids: notificationIds}
if err := bus.Dispatch(query); err != nil {
return nil, err
}