Skip to content

Commit

Permalink
Make new step notification more robust
Browse files Browse the repository at this point in the history
  • Loading branch information
alufers committed Mar 18, 2023
1 parent fbb277e commit 7677792
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions paczkobot/notifications_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ func (s *NotificationsService) sendNotificationsForUser(tgUser *FollowedPackageT
if len(notifications) == 0 {
return nil
}
msgContents := "The following packages have new updates: \n"
msgContents := ""

for _, n := range notifications {
loc := ""
Expand All @@ -81,12 +81,12 @@ func (s *NotificationsService) sendNotificationsForUser(tgUser *FollowedPackageT
}
customName := ""
if n.FollowedPackageTelegramUser.CustomName != "" {
customName = " (" + n.FollowedPackageTelegramUser.CustomName + ")"
customName = n.FollowedPackageTelegramUser.CustomName + " "
}
msgContents += fmt.Sprintf("<b>%v</b>%v (%v): %v %v%v\n",
n.FollowedPackageProvider.FollowedPackage.TrackingNumber,
msgContents += fmt.Sprintf("%v(%v) <b>%v</b>: %v %v%v\n",
customName,
n.FollowedPackageProvider.ProviderName,
n.FollowedPackageProvider.FollowedPackage.TrackingNumber,
n.FollowedPackageProvider.LastStatusValue,
n.FollowedPackageProvider.LastStatusDate.Format("2006-01-02 15:04"),
loc,
Expand Down

0 comments on commit 7677792

Please sign in to comment.