Skip to content

Commit

Permalink
[webhooks] add sms:delivered and sms:failed events
Browse files Browse the repository at this point in the history
  • Loading branch information
capcom6 committed Sep 16, 2024
1 parent 8a4d4f1 commit 61a219d
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions smsgateway/webhooks/webhook.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,20 @@ const (
EventTypeSmsReceived EventType = "sms:received"
// Triggered when an SMS is sent.
EventTypeSmsSent EventType = "sms:sent"
// Triggered when an SMS is delivered.
EventTypeSmsDelivered EventType = "sms:delivered"
// Triggered when an SMS processing fails.
EventTypeSmsFailed EventType = "sms:failed"
// Triggered when the device pings the server.
EventTypeSystemPing EventType = "system:ping"
)

var allEventTypes = map[EventType]struct{}{
EventTypeSmsReceived: {},
EventTypeSmsSent: {},
EventTypeSystemPing: {},
EventTypeSmsReceived: {},
EventTypeSmsSent: {},
EventTypeSmsDelivered: {},
EventTypeSmsFailed: {},
EventTypeSystemPing: {},
}

// IsValid checks if the given event type is valid.
Expand Down

0 comments on commit 61a219d

Please sign in to comment.