summaryrefslogtreecommitdiffstats
path: root/api
diff options
context:
space:
mode:
author=Corey Hulen <corey@hulen.com>2015-12-08 14:10:52 -0800
committer=Corey Hulen <corey@hulen.com>2015-12-08 14:10:52 -0800
commitf790bcdbc74d878e53de9f22ebaf3ba89cab656a (patch)
tree1fb9891558c3b4cbafc2a253fa9820fcfc6bad4d /api
parentd2db4b16211965271289311666537fbccc2afccc (diff)
downloadchat-f790bcdbc74d878e53de9f22ebaf3ba89cab656a.tar.gz
chat-f790bcdbc74d878e53de9f22ebaf3ba89cab656a.tar.bz2
chat-f790bcdbc74d878e53de9f22ebaf3ba89cab656a.zip
Updating the push message
Diffstat (limited to 'api')
-rw-r--r--api/post.go6
1 files changed, 5 insertions, 1 deletions
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()))