| 31 | } |
| 32 | |
| 33 | func (n *notifier) fetchAppName(ctx context.Context) (string, error) { |
| 34 | appName, err := n.store.GetApplicationName(ctx) |
| 35 | if err != nil { |
| 36 | if errors.Is(err, sql.ErrNoRows) { |
| 37 | return notificationsDefaultAppName, nil |
| 38 | } |
| 39 | return "", xerrors.Errorf("get application name: %w", err) |
| 40 | } |
| 41 | |
| 42 | if appName == "" { |
| 43 | appName = notificationsDefaultAppName |
| 44 | } |
| 45 | return appName, nil |
| 46 | } |
| 47 | |
| 48 | func (n *notifier) fetchLogoURL(ctx context.Context) (string, error) { |
| 49 | logoURL, err := n.store.GetLogoURL(ctx) |