[MM-36268] Fix replication lag error on post reply (#17752)
* Fix replication lag error on post reply * Improve further by using a db transaction
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
d093e102a4
Коммит
6483abd263
@@ -206,8 +206,15 @@ func (a *App) SendNotifications(post *model.Post, team *model.Team, channel *mod
|
||||
return
|
||||
}
|
||||
}
|
||||
_, err := a.Srv().Store.Thread().MaintainMembership(userID, post.RootId, true, incrementMentions, *a.Config().ServiceSettings.ThreadAutoFollow, userID == post.UserId, userID == post.UserId)
|
||||
|
||||
opts := store.ThreadMembershipOpts{
|
||||
Following: true,
|
||||
IncrementMentions: incrementMentions,
|
||||
UpdateFollowing: *a.Config().ServiceSettings.ThreadAutoFollow,
|
||||
UpdateViewedTimestamp: userID == post.UserId,
|
||||
UpdateParticipants: userID == post.UserId,
|
||||
}
|
||||
_, err := a.Srv().Store.Thread().MaintainMembership(userID, post.RootId, opts)
|
||||
if err != nil {
|
||||
mac <- model.NewAppError("SendNotifications", "app.channel.autofollow.app_error", nil, err.Error(), http.StatusInternalServerError)
|
||||
return
|
||||
|
||||
Ссылка в новой задаче
Block a user