Skip to content

Commit

Permalink
fix(notifications): only load valid device registrations (#1075)
Browse files Browse the repository at this point in the history
  • Loading branch information
peterbitfly authored Nov 6, 2024
1 parent 139fd79 commit 9c6feab
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion backend/pkg/api/data_access/notifications.go
Original file line number Diff line number Diff line change
Expand Up @@ -1161,7 +1161,7 @@ func (d *DataAccessService) GetNotificationSettings(ctx context.Context, userId
device_name,
COALESCE(notify_enabled, false) AS notify_enabled
FROM users_devices
WHERE user_id = $1`, userId)
WHERE user_id = $1 AND notification_token IS NOT NULL AND LENGTH(notification_token) > 0`, userId)
if err != nil {
return fmt.Errorf(`error retrieving data for notifications paired devices: %w`, err)
}
Expand Down

0 comments on commit 9c6feab

Please sign in to comment.