mirror of
https://github.com/mattermost/mattermost.git
synced 2026-09-24 16:05:00 +08:00
committed by
Harrison Healey
parent
6830627faa
commit
bf2038bc41
+9
-4
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user