MM-29988 - Update exising Post APIs with collapsed threads (#16503)

This commit is contained in:
Eli Yukelzon
2021-01-14 13:46:27 +02:00
committed by GitHub
parent 2e1b578ccd
commit b0bddeb5e6
28 changed files with 616 additions and 257 deletions

View File

@@ -4444,10 +4444,10 @@ func (s *TimerLayerPostStore) Delete(postId string, time int64, deleteByID strin
return err
}
func (s *TimerLayerPostStore) Get(id string, skipFetchThreads bool) (*model.PostList, error) {
func (s *TimerLayerPostStore) Get(id string, skipFetchThreads bool, collapsedThreads bool, collapsedThreadsExtended bool) (*model.PostList, error) {
start := timemodule.Now()
result, err := s.PostStore.Get(id, skipFetchThreads)
result, err := s.PostStore.Get(id, skipFetchThreads, collapsedThreads, collapsedThreadsExtended)
elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
if s.Root.Metrics != nil {
@@ -4476,10 +4476,10 @@ func (s *TimerLayerPostStore) GetDirectPostParentsForExportAfter(limit int, afte
return result, err
}
func (s *TimerLayerPostStore) GetEtag(channelId string, allowFromCache bool) string {
func (s *TimerLayerPostStore) GetEtag(channelId string, allowFromCache bool, collapsedThreads bool) string {
start := timemodule.Now()
result := s.PostStore.GetEtag(channelId, allowFromCache)
result := s.PostStore.GetEtag(channelId, allowFromCache, collapsedThreads)
elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
if s.Root.Metrics != nil {