(ctx context.Context)
| 46 | } |
| 47 | |
| 48 | func (n *notifier) fetchLogoURL(ctx context.Context) (string, error) { |
| 49 | logoURL, err := n.store.GetLogoURL(ctx) |
| 50 | if err != nil { |
| 51 | if errors.Is(err, sql.ErrNoRows) { |
| 52 | return notificationsDefaultLogoURL, nil |
| 53 | } |
| 54 | return "", xerrors.Errorf("get logo URL: %w", err) |
| 55 | } |
| 56 | |
| 57 | if logoURL == "" { |
| 58 | logoURL = notificationsDefaultLogoURL |
| 59 | } |
| 60 | return logoURL, nil |
| 61 | } |