Enhance notification system with in-app delivery support
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:
Mazyar
2026-06-21 14:47:15 +03:30
parent 2538747768
commit b671dc3fd8
4 changed files with 38 additions and 6 deletions
+4
View File
@@ -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 {