From d2db4b16211965271289311666537fbccc2afccc Mon Sep 17 00:00:00 2001 From: =Corey Hulen Date: Tue, 8 Dec 2015 14:06:52 -0800 Subject: Fixing defaults --- config/config.json | 4 ++-- docker/dev/config_docker.json | 4 ++-- docker/local/config_docker.json | 4 ++-- model/config.go | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/config/config.json b/config/config.json index 999ea8a83..4220d1055 100644 --- a/config/config.json +++ b/config/config.json @@ -68,8 +68,8 @@ "ConnectionSecurity": "", "InviteSalt": "bjlSR4QqkXFBr7TP4oDzlfZmcNuH9YoS", "PasswordResetSalt": "vZ4DcKyVVRlKHHJpexcuXzojkE5PZ5eL", - "SendPushNotifications": true, - "PushNotificationServer": "https://push.mattermost.com" + "SendPushNotifications": false, + "PushNotificationServer": "" }, "RateLimitSettings": { "EnableRateLimiter": true, diff --git a/docker/dev/config_docker.json b/docker/dev/config_docker.json index 4c5502ddd..a35abb9da 100644 --- a/docker/dev/config_docker.json +++ b/docker/dev/config_docker.json @@ -68,8 +68,8 @@ "ConnectionSecurity": "", "InviteSalt": "bjlSR4QqkXFBr7TP4oDzlfZmcNuH9YoS", "PasswordResetSalt": "vZ4DcKyVVRlKHHJpexcuXzojkE5PZ5eL", - "SendPushNotifications": true, - "PushNotificationServer": "https://push.mattermost.com" + "SendPushNotifications": false, + "PushNotificationServer": "" }, "RateLimitSettings": { "EnableRateLimiter": true, diff --git a/docker/local/config_docker.json b/docker/local/config_docker.json index 4c5502ddd..a35abb9da 100644 --- a/docker/local/config_docker.json +++ b/docker/local/config_docker.json @@ -68,8 +68,8 @@ "ConnectionSecurity": "", "InviteSalt": "bjlSR4QqkXFBr7TP4oDzlfZmcNuH9YoS", "PasswordResetSalt": "vZ4DcKyVVRlKHHJpexcuXzojkE5PZ5eL", - "SendPushNotifications": true, - "PushNotificationServer": "https://push.mattermost.com" + "SendPushNotifications": false, + "PushNotificationServer": "" }, "RateLimitSettings": { "EnableRateLimiter": true, diff --git a/model/config.go b/model/config.go index 869f975e6..14ce444c5 100644 --- a/model/config.go +++ b/model/config.go @@ -181,12 +181,12 @@ func (o *Config) SetDefaults() { if o.EmailSettings.SendPushNotifications == nil { o.EmailSettings.SendPushNotifications = new(bool) - *o.EmailSettings.SendPushNotifications = true + *o.EmailSettings.SendPushNotifications = false } if o.EmailSettings.PushNotificationServer == nil { o.EmailSettings.PushNotificationServer = new(string) - *o.EmailSettings.PushNotificationServer = "https://push.mattermost.com" + *o.EmailSettings.PushNotificationServer = "" } } -- cgit v1.2.3-1-g7c22 From f790bcdbc74d878e53de9f22ebaf3ba89cab656a Mon Sep 17 00:00:00 2001 From: =Corey Hulen Date: Tue, 8 Dec 2015 14:10:52 -0800 Subject: Updating the push message --- api/post.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/api/post.go b/api/post.go index e1adc1d98..14dce89e9 100644 --- a/api/post.go +++ b/api/post.go @@ -565,7 +565,11 @@ func sendNotificationsAndForget(c *Context, post *model.Post, team *model.Team, msg.DeviceId = strings.TrimPrefix(session.DeviceId, "apple:") msg.ServerId = utils.CfgDiagnosticId - msg.Message = profileMap[id].FirstName + " mentioned you in " + channel.DisplayName + if channel.Type == model.CHANNEL_DIRECT { + msg.Message = channelName + " send you a direct message" + } else { + msg.Message = profileMap[id].FirstName + " mentioned you in " + channelName + } httpClient := http.Client{} request, _ := http.NewRequest("POST", *utils.Cfg.EmailSettings.PushNotificationServer+"/api/v1/send_push", strings.NewReader(msg.ToJson())) -- cgit v1.2.3-1-g7c22 From 20e3c568d146d0fe653975c8059cd4bc2e7911e9 Mon Sep 17 00:00:00 2001 From: =Corey Hulen Date: Wed, 9 Dec 2015 06:13:25 -0800 Subject: fixing typo --- api/post.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/post.go b/api/post.go index 14dce89e9..6736d75e2 100644 --- a/api/post.go +++ b/api/post.go @@ -566,7 +566,7 @@ func sendNotificationsAndForget(c *Context, post *model.Post, team *model.Team, msg.ServerId = utils.CfgDiagnosticId if channel.Type == model.CHANNEL_DIRECT { - msg.Message = channelName + " send you a direct message" + msg.Message = channelName + " sent you a direct message" } else { msg.Message = profileMap[id].FirstName + " mentioned you in " + channelName } -- cgit v1.2.3-1-g7c22