MM-35300 CRT: No mention badge on Threads when user is mentioned in both the root post and a reply post (#17541)
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
861745e33b
Коммит
611e03de94
@@ -191,10 +191,6 @@ func (a *App) SendNotifications(post *model.Post, team *model.Team, channel *mod
|
|||||||
mac := make(chan *model.AppError, 1)
|
mac := make(chan *model.AppError, 1)
|
||||||
go func(userID string) {
|
go func(userID string) {
|
||||||
defer close(mac)
|
defer close(mac)
|
||||||
isRootMention := false
|
|
||||||
if rootMentions != nil {
|
|
||||||
_, isRootMention = rootMentions.Mentions[userID]
|
|
||||||
}
|
|
||||||
_, incrementMentions := mentions.Mentions[userID]
|
_, incrementMentions := mentions.Mentions[userID]
|
||||||
// if the user was not explicitly mentioned, check if they explicitly unfollowed the thread
|
// if the user was not explicitly mentioned, check if they explicitly unfollowed the thread
|
||||||
if !incrementMentions {
|
if !incrementMentions {
|
||||||
@@ -210,7 +206,8 @@ func (a *App) SendNotifications(post *model.Post, team *model.Team, channel *mod
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
_, err := a.Srv().Store.Thread().MaintainMembership(userID, post.RootId, true, !isRootMention && incrementMentions, *a.Config().ServiceSettings.ThreadAutoFollow, userID == post.UserId, userID == post.UserId)
|
_, err := a.Srv().Store.Thread().MaintainMembership(userID, post.RootId, true, incrementMentions, *a.Config().ServiceSettings.ThreadAutoFollow, userID == post.UserId, userID == post.UserId)
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
mac <- model.NewAppError("SendNotifications", "app.channel.autofollow.app_error", nil, err.Error(), http.StatusInternalServerError)
|
mac <- model.NewAppError("SendNotifications", "app.channel.autofollow.app_error", nil, err.Error(), http.StatusInternalServerError)
|
||||||
return
|
return
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user