summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCorey Hulen <corey@hulen.com>2017-04-27 04:51:19 -0700
committerJoram Wilander <jwawilander@gmail.com>2017-04-27 07:51:19 -0400
commita6397b5ed9c4d6a1afe018ad766555c18c3a6983 (patch)
tree0516a9f02dca7aeff752d9f942b756df4b1afa72
parentc540e801662e2d672bbaa832e93acf480b0b0c65 (diff)
downloadchat-a6397b5ed9c4d6a1afe018ad766555c18c3a6983.tar.gz
chat-a6397b5ed9c4d6a1afe018ad766555c18c3a6983.tar.bz2
chat-a6397b5ed9c4d6a1afe018ad766555c18c3a6983.zip
PLT-6108 fixing to use senderId for push (#6245)
-rw-r--r--app/notification.go2
-rw-r--r--model/push_notification.go2
2 files changed, 2 insertions, 2 deletions
diff --git a/app/notification.go b/app/notification.go
index 62e5e6c82..c14701b5f 100644
--- a/app/notification.go
+++ b/app/notification.go
@@ -494,7 +494,7 @@ func sendPushNotification(post *model.Post, user *model.User, channel *model.Cha
msg.TeamId = channel.TeamId
msg.ChannelId = channel.Id
msg.ChannelName = channel.Name
- msg.UserId = user.Id
+ msg.SenderId = post.UserId
if ou, ok := post.Props["override_username"]; ok && ou != nil {
msg.OverrideUsername = ou.(string)
diff --git a/model/push_notification.go b/model/push_notification.go
index 5131c033d..654d1d9a5 100644
--- a/model/push_notification.go
+++ b/model/push_notification.go
@@ -36,7 +36,7 @@ type PushNotification struct {
ChannelId string `json:"channel_id"`
ChannelName string `json:"channel_name"`
Type string `json:"type"`
- UserId string `json:"user_id"`
+ SenderId string `json:"sender_id"`
OverrideUsername string `json:"override_username"`
OverrideIconUrl string `json:"override_icon_url"`
FromWebhook string `json:"from_webhook"`