diff options
author | Harrison Healey <harrisonmhealey@gmail.com> | 2018-09-07 09:24:18 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-07 09:24:18 -0400 |
commit | 0027d998555d47f9a75a896d8c6c85a8b4645ad0 (patch) | |
tree | 4a15d63c143e9891921d75f102dd008852c9abb2 /app/notification_push.go | |
parent | 291000703320cc53c3bdecd2553fa4a3021d7234 (diff) | |
download | chat-0027d998555d47f9a75a896d8c6c85a8b4645ad0.tar.gz chat-0027d998555d47f9a75a896d8c6c85a8b4645ad0.tar.bz2 chat-0027d998555d47f9a75a896d8c6c85a8b4645ad0.zip |
MM-11855 Add App.HTTPService to allow mocking of HTTP client (#9359)
* MM-11855 Add App.HTTPService to allow mocking of HTTP client
* Initialize HTTPService earlier
Diffstat (limited to 'app/notification_push.go')
-rw-r--r-- | app/notification_push.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/notification_push.go b/app/notification_push.go index 12d9f5258..517988a97 100644 --- a/app/notification_push.go +++ b/app/notification_push.go @@ -184,7 +184,7 @@ func (a *App) sendToPushProxy(msg model.PushNotification, session *model.Session request, _ := http.NewRequest("POST", strings.TrimRight(*a.Config().EmailSettings.PushNotificationServer, "/")+model.API_URL_SUFFIX_V1+"/send_push", strings.NewReader(msg.ToJson())) - if resp, err := a.HTTPClient(true).Do(request); err != nil { + if resp, err := a.HTTPService.MakeClient(true).Do(request); err != nil { mlog.Error(fmt.Sprintf("Device push reported as error for UserId=%v SessionId=%v message=%v", session.UserId, session.Id, err.Error()), mlog.String("user_id", session.UserId)) } else { pushResponse := model.PushResponseFromJson(resp.Body) |