Compare commits

..

3 Commits

Author SHA1 Message Date
1f77b93ec7 empty notification title and message fix 2026-03-17 04:39:47 -07:00
1716cc4b1d readme update 2026-03-17 00:57:39 -07:00
6813722cb3 readme update 2026-03-16 05:02:30 -07:00

View File

@ -231,6 +231,15 @@ func mapDBToDomain(db *dbgen.Notification) *domain.Notification {
payload = domain.NotificationPayload{}
}
headline := payload.Headline
if headline == "" {
headline = db.Title
}
message := payload.Message
if message == "" {
message = db.Message
}
var channel domain.DeliveryChannel
if db.Channel.Valid {
channel = domain.DeliveryChannel(db.Channel.String)
@ -245,8 +254,9 @@ func mapDBToDomain(db *dbgen.Notification) *domain.Notification {
DeliveryChannel: channel,
DeliveryStatus: domain.DeliveryStatusPending,
Payload: domain.NotificationPayload{
Headline: payload.Headline,
Message: payload.Message,
Headline: headline,
Message: message,
Tags: payload.Tags,
},
IsRead: db.IsRead,
Timestamp: db.CreatedAt.Time,