Skip to content

Commit

Permalink
feat: Add SendEmailsEvent
Browse files Browse the repository at this point in the history
  • Loading branch information
bastianbeier committed Jan 9, 2025
1 parent 9d64adf commit 6293d56
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
5 changes: 5 additions & 0 deletions changelog/unreleased/send-emails-event.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Enhancement: Add SendEmailsEvent

Adds SendEmailsEvent that is used to trigger the sending of group emails.

https://github.com/cs3org/reva/pull/5032
17 changes: 17 additions & 0 deletions pkg/events/notifications.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
package events

import (
"encoding/json"
)

// SendEmailsEvent instructs the notification service to send grouped emails
type SendEmailsEvent struct {
Interval string
}

// Unmarshal to fulfill umarshaller interface
func (SendEmailsEvent) Unmarshal(v []byte) (interface{}, error) {
e := SendEmailsEvent{}
err := json.Unmarshal(v, &e)
return e, err
}

0 comments on commit 6293d56

Please sign in to comment.