PLT-6523: Don't crash when replying to a post whose poster has left the channel. (#6388)

Этот коммит содержится в:
George Goldberg
2017-05-11 00:16:45 +01:00
коммит произвёл Joram Wilander
родитель 2b7e71e47a
Коммит 6026ed9d53
2 изменённых файлов: 45 добавлений и 1 удалений

Просмотреть файл

@@ -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
}
}