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

Этот коммит содержится в:
Eli Yukelzon
2021-01-14 13:46:27 +02:00
коммит произвёл GitHub
родитель 2e1b578ccd
Коммит b0bddeb5e6
28 изменённых файлов: 616 добавлений и 257 удалений

Просмотреть файл

@@ -4898,7 +4898,7 @@ func (s *OpenTracingLayerPostStore) Delete(postId string, time int64, deleteByID
return err
}
func (s *OpenTracingLayerPostStore) Get(id string, skipFetchThreads bool) (*model.PostList, error) {
func (s *OpenTracingLayerPostStore) Get(id string, skipFetchThreads bool, collapsedThreads bool, collapsedThreadsExtended bool) (*model.PostList, error) {
origCtx := s.Root.Store.Context()
span, newCtx := tracing.StartSpanWithParentByContext(s.Root.Store.Context(), "PostStore.Get")
s.Root.Store.SetContext(newCtx)
@@ -4907,7 +4907,7 @@ func (s *OpenTracingLayerPostStore) Get(id string, skipFetchThreads bool) (*mode
}()
defer span.Finish()
result, err := s.PostStore.Get(id, skipFetchThreads)
result, err := s.PostStore.Get(id, skipFetchThreads, collapsedThreads, collapsedThreadsExtended)
if err != nil {
span.LogFields(spanlog.Error(err))
ext.Error.Set(span, true)
@@ -4934,7 +4934,7 @@ func (s *OpenTracingLayerPostStore) GetDirectPostParentsForExportAfter(limit int
return result, err
}
func (s *OpenTracingLayerPostStore) GetEtag(channelId string, allowFromCache bool) string {
func (s *OpenTracingLayerPostStore) GetEtag(channelId string, allowFromCache bool, collapsedThreads bool) string {
origCtx := s.Root.Store.Context()
span, newCtx := tracing.StartSpanWithParentByContext(s.Root.Store.Context(), "PostStore.GetEtag")
s.Root.Store.SetContext(newCtx)
@@ -4943,7 +4943,7 @@ func (s *OpenTracingLayerPostStore) GetEtag(channelId string, allowFromCache boo
}()
defer span.Finish()
result := s.PostStore.GetEtag(channelId, allowFromCache)
result := s.PostStore.GetEtag(channelId, allowFromCache, collapsedThreads)
return result
}