Reduce number of calls to IsCRTEnabled (#23963)
In a single createPost flow, there were 3 separate calls to App.IsCRTEnabled. This showed up very slightly in the CPU profiles. Not a big deal, but good to get it out of the way. ```release-note NONE ```
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
b5a3eee739
Коммит
49e1d039f5
@@ -93,7 +93,7 @@ func TestExportUserChannels(t *testing.T) {
|
||||
Value: "true",
|
||||
}
|
||||
|
||||
_, appErr := th.App.MarkChannelsAsViewed(th.Context, []string{th.BasicPost.ChannelId}, user.Id, "", true)
|
||||
_, appErr := th.App.MarkChannelsAsViewed(th.Context, []string{th.BasicPost.ChannelId}, user.Id, "", true, th.App.IsCRTEnabledForUser(th.Context, user.Id))
|
||||
require.Nil(t, appErr)
|
||||
|
||||
var preferences model.Preferences
|
||||
|
||||
Ссылка в новой задаче
Block a user