0.3.35
This commit is contained in:
@@ -42,6 +42,7 @@ func DefaultNotificationPreferences() NotificationPreferences {
|
||||
type UserNotification struct {
|
||||
ID int64 `json:"id"`
|
||||
Kind string `json:"kind"`
|
||||
SourceKey string `json:"-"`
|
||||
ItemID string `json:"itemId,omitempty"`
|
||||
Title string `json:"title"`
|
||||
Message string `json:"message"`
|
||||
@@ -345,7 +346,7 @@ func (s *Store) UpsertNotification(
|
||||
|
||||
func (s *Store) UserNotifications(ctx context.Context, userID string) ([]UserNotification, error) {
|
||||
rows, err := s.pool.Query(ctx, `
|
||||
SELECT id, kind, item_id, title, message, event_at, created_at, read_at
|
||||
SELECT id, kind, source_key, item_id, title, message, event_at, created_at, read_at
|
||||
FROM user_notifications
|
||||
WHERE emby_user_id = $1 AND dismissed_at IS NULL
|
||||
ORDER BY created_at DESC LIMIT 100`, userID)
|
||||
@@ -357,7 +358,7 @@ func (s *Store) UserNotifications(ctx context.Context, userID string) ([]UserNot
|
||||
for rows.Next() {
|
||||
var notification UserNotification
|
||||
if err := rows.Scan(
|
||||
¬ification.ID, ¬ification.Kind, ¬ification.ItemID,
|
||||
¬ification.ID, ¬ification.Kind, ¬ification.SourceKey, ¬ification.ItemID,
|
||||
¬ification.Title, ¬ification.Message, ¬ification.EventAt,
|
||||
¬ification.CreatedAt, ¬ification.ReadAt,
|
||||
); err != nil {
|
||||
|
||||
Reference in New Issue
Block a user