From 6e668e538c394b6fdae800b7700f37115b96b388 Mon Sep 17 00:00:00 2001 From: Andre Medeiros Date: Thu, 27 Oct 2022 21:54:30 -0400 Subject: [PATCH] omit live activity fields when they're empty --- internal/worker/live_activities.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/internal/worker/live_activities.go b/internal/worker/live_activities.go index 4a8b68d..ff47da9 100644 --- a/internal/worker/live_activities.go +++ b/internal/worker/live_activities.go @@ -24,11 +24,11 @@ import ( type DynamicIslandNotification struct { PostCommentCount int `json:"postTotalComments"` PostScore int64 `json:"postScore"` - CommentID string `json:"commentId"` - CommentAuthor string `json:"commentAuthor"` - CommentBody string `json:"commentBody"` - CommentAge int64 `json:"commentAge"` - CommentScore int64 `json:"commentScore"` + CommentID string `json:"commentId,omitempty"` + CommentAuthor string `json:"commentAuthor,omitempty"` + CommentBody string `json:"commentBody,omitempty"` + CommentAge int64 `json:"commentAge,omitempty"` + CommentScore int64 `json:"commentScore,omitempty"` } type liveActivitiesWorker struct {