(cherry picked from commit 7235480be5)
Co-authored-by: George Robinson <george.robinson@grafana.com>
This commit is contained in:
co-authored by
George Robinson
parent
89d7358211
commit
5a1842635d
@@ -201,8 +201,7 @@ func (d DiscordNotifier) constructAttachments(ctx context.Context, as []*types.A
|
||||
_ = withStoredImages(ctx, d.log, d.images,
|
||||
func(index int, image *ngmodels.Image) error {
|
||||
if embedQuota < 1 {
|
||||
// TODO: Could be a sentinel error to stop execution.
|
||||
return nil
|
||||
return ErrImagesDone
|
||||
}
|
||||
|
||||
if image == nil {
|
||||
|
||||
@@ -147,6 +147,7 @@ func (sn *SensuGoNotifier) Notify(ctx context.Context, as ...*types.Alert) (bool
|
||||
// one image per request.
|
||||
if image != nil && image.URL != "" && imageURL == "" {
|
||||
imageURL = image.URL
|
||||
return ErrImagesDone
|
||||
}
|
||||
return nil
|
||||
}, as...)
|
||||
|
||||
Reference in New Issue
Block a user