mirror of
https://github.com/coder/coder.git
synced 2025-07-15 22:20:27 +00:00
feat(coderd): add new dispatch logic for coder inbox (#16764)
This PR is [resolving the dispatch part of Coder Inbocx](https://github.com/coder/internal/issues/403). Since the DB layer has been merged - we now want to insert notifications into Coder Inbox in parallel of the other delivery target. To do so, we push two messages instead of one using the `Enqueue` method.
This commit is contained in:
@ -878,6 +878,7 @@ type NotificationMethod string
|
||||
const (
|
||||
NotificationMethodSmtp NotificationMethod = "smtp"
|
||||
NotificationMethodWebhook NotificationMethod = "webhook"
|
||||
NotificationMethodInbox NotificationMethod = "inbox"
|
||||
)
|
||||
|
||||
func (e *NotificationMethod) Scan(src interface{}) error {
|
||||
@ -918,7 +919,8 @@ func (ns NullNotificationMethod) Value() (driver.Value, error) {
|
||||
func (e NotificationMethod) Valid() bool {
|
||||
switch e {
|
||||
case NotificationMethodSmtp,
|
||||
NotificationMethodWebhook:
|
||||
NotificationMethodWebhook,
|
||||
NotificationMethodInbox:
|
||||
return true
|
||||
}
|
||||
return false
|
||||
@ -928,6 +930,7 @@ func AllNotificationMethodValues() []NotificationMethod {
|
||||
return []NotificationMethod{
|
||||
NotificationMethodSmtp,
|
||||
NotificationMethodWebhook,
|
||||
NotificationMethodInbox,
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user