From 6026ed9d537cc2f41a263694a06b56cd645081b7 Mon Sep 17 00:00:00 2001 From: George Goldberg Date: Thu, 11 May 2017 00:16:45 +0100 Subject: PLT-6523: Don't crash when replying to a post whose poster has left the channel. (#6388) --- app/notification.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/notification.go') diff --git a/app/notification.go b/app/notification.go index c48465003..0f59fae21 100644 --- a/app/notification.go +++ b/app/notification.go @@ -83,7 +83,7 @@ func SendNotifications(post *model.Post, team *model.Team, channel *model.Channe for _, threadPost := range list.Posts { profile := profileMap[threadPost.UserId] - if profile.NotifyProps["comments"] == "any" || (profile.NotifyProps["comments"] == "root" && threadPost.Id == list.Order[0]) { + if profile != nil && (profile.NotifyProps["comments"] == "any" || (profile.NotifyProps["comments"] == "root" && threadPost.Id == list.Order[0])) { mentionedUserIds[threadPost.UserId] = true } } -- cgit v1.2.3-1-g7c22