diff --git a/changelog/unreleased/send-emails-event.md b/changelog/unreleased/send-emails-event.md new file mode 100644 index 0000000000..b129e0d5fa --- /dev/null +++ b/changelog/unreleased/send-emails-event.md @@ -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 \ No newline at end of file diff --git a/pkg/events/notifications.go b/pkg/events/notifications.go new file mode 100644 index 0000000000..6a31479569 --- /dev/null +++ b/pkg/events/notifications.go @@ -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 +}