summaryrefslogtreecommitdiffstats
path: root/app/notification.go
diff options
context:
space:
mode:
authorGeorge Goldberg <george@gberg.me>2017-05-11 00:16:45 +0100
committerJoram Wilander <jwawilander@gmail.com>2017-05-10 19:16:45 -0400
commit6026ed9d537cc2f41a263694a06b56cd645081b7 (patch)
treedab17c0f1f108b94801bf2d3f26fc63f28705ef5 /app/notification.go
parent2b7e71e47a0679396e64993b49c6d7c3d4321030 (diff)
downloadchat-6026ed9d537cc2f41a263694a06b56cd645081b7.tar.gz
chat-6026ed9d537cc2f41a263694a06b56cd645081b7.tar.bz2
chat-6026ed9d537cc2f41a263694a06b56cd645081b7.zip
PLT-6523: Don't crash when replying to a post whose poster has left the channel. (#6388)
Diffstat (limited to 'app/notification.go')
-rw-r--r--app/notification.go2
1 files changed, 1 insertions, 1 deletions
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
}
}