mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
MM-9918: Trim trailing / from push proxy URL. (#8635)
This commit is contained in:
committed by
Christopher Speller
parent
af98bf1d49
commit
5511106d93
@@ -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())
|
||||
|
||||
Reference in New Issue
Block a user