mirror of
https://github.com/coder/coder.git
synced 2025-07-03 16:13:58 +00:00
fix: ensure targets are propagated to inbox (#16985)
Currently the `targets` column in `inbox_notifications` doesn't get filled. This PR fixes that. Rather than give targets special treatment, we should put it in the payload like everything else. This correctly propagates notification targets to the inbox table without much code change.
This commit is contained in:
@ -3804,7 +3804,6 @@ SELECT
|
||||
nm.method,
|
||||
nm.attempt_count::int AS attempt_count,
|
||||
nm.queued_seconds::float AS queued_seconds,
|
||||
nm.targets,
|
||||
-- template
|
||||
nt.id AS template_id,
|
||||
nt.title_template,
|
||||
@ -3830,7 +3829,6 @@ type AcquireNotificationMessagesRow struct {
|
||||
Method NotificationMethod `db:"method" json:"method"`
|
||||
AttemptCount int32 `db:"attempt_count" json:"attempt_count"`
|
||||
QueuedSeconds float64 `db:"queued_seconds" json:"queued_seconds"`
|
||||
Targets []uuid.UUID `db:"targets" json:"targets"`
|
||||
TemplateID uuid.UUID `db:"template_id" json:"template_id"`
|
||||
TitleTemplate string `db:"title_template" json:"title_template"`
|
||||
BodyTemplate string `db:"body_template" json:"body_template"`
|
||||
@ -3867,7 +3865,6 @@ func (q *sqlQuerier) AcquireNotificationMessages(ctx context.Context, arg Acquir
|
||||
&i.Method,
|
||||
&i.AttemptCount,
|
||||
&i.QueuedSeconds,
|
||||
pq.Array(&i.Targets),
|
||||
&i.TemplateID,
|
||||
&i.TitleTemplate,
|
||||
&i.BodyTemplate,
|
||||
|
Reference in New Issue
Block a user