Skip to content

Commit

Permalink
fix: add copying campaign object before sending test message (#1659)
Browse files Browse the repository at this point in the history
  • Loading branch information
mpilnan committed Jan 9, 2024
1 parent 3335171 commit 78caa35
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cmd/campaigns.go
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,8 @@ func handleTestCampaign(c echo.Context) error {
// Send the test messages.
for _, s := range subs {
sub := s
if err := sendTestMessage(sub, &camp, app); err != nil {
c := camp
if err := sendTestMessage(sub, &c, app); err != nil {
app.log.Printf("error sending test message: %v", err)
return echo.NewHTTPError(http.StatusInternalServerError,
app.i18n.Ts("campaigns.errorSendTest", "error", err.Error()))
Expand Down

0 comments on commit 78caa35

Please sign in to comment.