[MM-9703] Push notifications are sent for own DM's (#8439)

update
Этот коммит содержится в:
Carlos Tadeu Panato Junior
2018-03-15 15:42:49 +01:00
коммит произвёл Harrison Healey
родитель 6830627faa
Коммит bf2038bc41

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

@@ -55,10 +55,15 @@ func (a *App) SendNotifications(post *model.Post, team *model.Team, channel *mod
if channel.Type == model.CHANNEL_DIRECT {
var otherUserId string
if userIds := strings.Split(channel.Name, "__"); userIds[0] == post.UserId {
otherUserId = userIds[1]
} else {
otherUserId = userIds[0]
userIds := strings.Split(channel.Name, "__")
if userIds[0] != userIds[1] {
if userIds[0] == post.UserId {
otherUserId = userIds[1]
} else {
otherUserId = userIds[0]
}
}
if _, ok := profileMap[otherUserId]; ok {