summaryrefslogtreecommitdiffstats
path: root/api
diff options
context:
space:
mode:
authorGeorge Goldberg <george@gberg.me>2017-01-06 14:02:37 +0000
committerHarrison Healey <harrisonmhealey@gmail.com>2017-01-06 09:02:37 -0500
commitbc08cc0ca5638957371aa6184ec0d11c9df16264 (patch)
tree571eb94db075622766b4a90107dd242083011f1c /api
parentaf01229ed8317225a36a5602e513cb112eafd768 (diff)
downloadchat-bc08cc0ca5638957371aa6184ec0d11c9df16264.tar.gz
chat-bc08cc0ca5638957371aa6184ec0d11c9df16264.tar.bz2
chat-bc08cc0ca5638957371aa6184ec0d11c9df16264.zip
PLT-4096 fix error/panic on replying to integrations. (#4968)
Diffstat (limited to 'api')
-rw-r--r--api/post.go7
1 files changed, 4 insertions, 3 deletions
diff --git a/api/post.go b/api/post.go
index 354fe35db..e66a51295 100644
--- a/api/post.go
+++ b/api/post.go
@@ -624,9 +624,10 @@ func sendNotifications(c *Context, post *model.Post, team *model.Team, channel *
list := result.Data.(*model.PostList)
for _, threadPost := range list.Posts {
- profile := profileMap[threadPost.UserId]
- if profile.NotifyProps["comments"] == "any" || (profile.NotifyProps["comments"] == "root" && threadPost.Id == list.Order[0]) {
- mentionedUserIds[threadPost.UserId] = true
+ if profile, ok := profileMap[threadPost.UserId]; ok {
+ if profile.NotifyProps["comments"] == "any" || (profile.NotifyProps["comments"] == "root" && threadPost.Id == list.Order[0]) {
+ mentionedUserIds[threadPost.UserId] = true
+ }
}
}
}