From bc08cc0ca5638957371aa6184ec0d11c9df16264 Mon Sep 17 00:00:00 2001 From: George Goldberg Date: Fri, 6 Jan 2017 14:02:37 +0000 Subject: PLT-4096 fix error/panic on replying to integrations. (#4968) --- api/post.go | 7 ++++--- 1 file 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 + } } } } -- cgit v1.2.3-1-g7c22