diff options
author | George Goldberg <george@gberg.me> | 2018-04-17 15:13:16 +0100 |
---|---|---|
committer | Christopher Speller <crspeller@gmail.com> | 2018-04-17 07:13:16 -0700 |
commit | 5511106d93a16626290763e8772b8b562f22100d (patch) | |
tree | ccbeb9779430436369dbf0779eb132e00998857c | |
parent | af98bf1d49b418a7cf99f28983899839ae101851 (diff) | |
download | chat-5511106d93a16626290763e8772b8b562f22100d.tar.gz chat-5511106d93a16626290763e8772b8b562f22100d.tar.bz2 chat-5511106d93a16626290763e8772b8b562f22100d.zip |
MM-9918: Trim trailing / from push proxy URL. (#8635)
-rw-r--r-- | app/notification.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/notification.go b/app/notification.go index 2d56d294a..e4ee041af 100644 --- a/app/notification.go +++ b/app/notification.go @@ -736,7 +736,7 @@ func (a *App) ClearPushNotification(userId string, channelId string) { func (a *App) sendToPushProxy(msg model.PushNotification, session *model.Session) { msg.ServerId = a.DiagnosticId() - request, _ := http.NewRequest("POST", *a.Config().EmailSettings.PushNotificationServer+model.API_URL_SUFFIX_V1+"/send_push", strings.NewReader(msg.ToJson())) + 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 { l4g.Error("Device push reported as error for UserId=%v SessionId=%v message=%v", session.UserId, session.Id, err.Error()) |