Make sure profile is not nil when assigning in sendNotifications (#3395)

Этот коммит содержится в:
Joram Wilander
2016-06-21 23:05:54 -04:00
коммит произвёл GitHub
родитель 295d265709
Коммит 5f176e4974

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

@@ -493,7 +493,9 @@ func sendNotifications(c *Context, post *model.Post, team *model.Team, channel *
// Find out who is a member of the channel, only keep those profiles
tempProfileMap := make(map[string]*model.User)
for _, member := range members {
tempProfileMap[member.UserId] = profileMap[member.UserId]
if profile, ok := profileMap[member.UserId]; ok {
tempProfileMap[member.UserId] = profile
}
}
profileMap = tempProfileMap