mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
feat(coderd): add company logo when available for email notifications (#14935)
This PR aims to close #14253 We keep the default behavior using the Coder logo if there's no logo set. Otherwise we want to use the logo based on the URL set in appearance. --------- Co-authored-by: defelmnq <yvincent@coder.com>
This commit is contained in:
co-authored by
defelmnq
parent
c42f487668
commit
297089e944
@@ -5,6 +5,7 @@ import (
|
||||
"encoding/json"
|
||||
"sync/atomic"
|
||||
"testing"
|
||||
"text/template"
|
||||
"time"
|
||||
|
||||
"github.com/google/uuid"
|
||||
@@ -210,8 +211,8 @@ type santaHandler struct {
|
||||
nice atomic.Int32
|
||||
}
|
||||
|
||||
func (s *santaHandler) Dispatcher(payload types.MessagePayload, _, _ string) (dispatch.DeliveryFunc, error) {
|
||||
return func(ctx context.Context, msgID uuid.UUID) (retryable bool, err error) {
|
||||
func (s *santaHandler) Dispatcher(payload types.MessagePayload, _, _ string, _ template.FuncMap) (dispatch.DeliveryFunc, error) {
|
||||
return func(_ context.Context, _ uuid.UUID) (retryable bool, err error) {
|
||||
if payload.Labels["nice"] != "true" {
|
||||
s.naughty.Add(1)
|
||||
return false, xerrors.New("be nice")
|
||||
|
||||
Reference in New Issue
Block a user