[MM-60603] Don't follow threads when marking them as read on focus (#28263)
* [MM-60603] Don't follow threads when marking them as read on focus * Fix tests * Fix lint * Fix the original bug in the API call
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
3428cd15b6
Коммит
d58b048965
@@ -2831,13 +2831,10 @@ func (a *App) UpdateThreadReadForUser(c request.CTX, currentSessionId, userID, t
|
||||
return nil, err
|
||||
}
|
||||
|
||||
opts := store.ThreadMembershipOpts{
|
||||
Following: true,
|
||||
UpdateFollowing: true,
|
||||
}
|
||||
membership, storeErr := a.Srv().Store().Thread().MaintainMembership(userID, threadID, opts)
|
||||
if storeErr != nil {
|
||||
return nil, model.NewAppError("UpdateThreadReadForUser", "app.user.update_thread_read_for_user.app_error", nil, "", http.StatusInternalServerError).Wrap(storeErr)
|
||||
// If the thread doesn't have a membership, we shouldn't try to mark it as unread
|
||||
membership, err := a.GetThreadMembershipForUser(userID, threadID)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
previousUnreadMentions := membership.UnreadMentions
|
||||
|
||||
Ссылка в новой задаче
Block a user