Notification with avatar(only in APNs) and picture

This commit is contained in:
2024-07-19 23:27:58 +08:00
parent 282a0891d0
commit 8fcaf99103
4 changed files with 66 additions and 51 deletions

View File

@ -12,6 +12,8 @@ type Notification struct {
Subtitle *string `json:"subtitle"`
Body string `json:"body"`
Metadata datatypes.JSONMap `json:"metadata"`
Avatar *string `json:"avatar"`
Picture *string `json:"picture"`
AccountID uint `json:"account_id"`
SenderID *uint `json:"sender_id"`
@ -19,12 +21,6 @@ type Notification struct {
IsForcePush bool `json:"is_force_push" gorm:"-"`
}
// NotificationLink Used to embed into notify and render actions
type NotificationLink struct {
Label string `json:"label"`
Url string `json:"url"`
}
const (
NotifySubscriberFirebase = "firebase"
NotifySubscriberAPNs = "apple"