Enhance notification system with in-app delivery support
continuous-integration/drone/push Build is passing
continuous-integration/drone/push Build is passing
- Added `DeliveryChannelInApp` to support in-app notifications. - Introduced `EventTypeInApp` constant for identifying in-app notifications. - Updated `AdminNotifications` and `CustomerNotifications` handlers to set the event type to `EventTypeInApp`. - Modified the `GetByUserID` repository method to handle filtering for in-app notifications, allowing for more flexible retrieval options. - Updated the `persistNotification` method to include in-app as a delivery method. This update improves the notification system by enabling in-app notifications, enhancing user engagement and notification management capabilities.
This commit is contained in:
@@ -147,6 +147,8 @@ func (h *NotificationHandler) AdminNotifications(c echo.Context) error {
|
||||
|
||||
form.Recipient = []string{userID}
|
||||
form.Status = "sent"
|
||||
form.EventType = EventTypeInApp
|
||||
form.Method = ""
|
||||
|
||||
pagination, err := response.NewPagination(c)
|
||||
if err != nil {
|
||||
@@ -265,6 +267,8 @@ func (h *NotificationHandler) CustomerNotifications(c echo.Context) error {
|
||||
|
||||
form.Recipient = []string{userID}
|
||||
form.Status = "sent"
|
||||
form.EventType = EventTypeInApp
|
||||
form.Method = ""
|
||||
|
||||
pagination, err := response.NewPagination(c)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user