MM-30304 - Handle collapsed threads in page apis (#17064)
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
f2e27a39da
Коммит
4aa6c863c3
@@ -5112,7 +5112,7 @@ func (s *OpenTracingLayerPostStore) GetParentsForExportAfter(limit int, afterID
|
||||
return result, err
|
||||
}
|
||||
|
||||
func (s *OpenTracingLayerPostStore) GetPostAfterTime(channelID string, time int64) (*model.Post, error) {
|
||||
func (s *OpenTracingLayerPostStore) GetPostAfterTime(channelID string, time int64, collapsedThreads bool) (*model.Post, error) {
|
||||
origCtx := s.Root.Store.Context()
|
||||
span, newCtx := tracing.StartSpanWithParentByContext(s.Root.Store.Context(), "PostStore.GetPostAfterTime")
|
||||
s.Root.Store.SetContext(newCtx)
|
||||
@@ -5121,7 +5121,7 @@ func (s *OpenTracingLayerPostStore) GetPostAfterTime(channelID string, time int6
|
||||
}()
|
||||
|
||||
defer span.Finish()
|
||||
result, err := s.PostStore.GetPostAfterTime(channelID, time)
|
||||
result, err := s.PostStore.GetPostAfterTime(channelID, time, collapsedThreads)
|
||||
if err != nil {
|
||||
span.LogFields(spanlog.Error(err))
|
||||
ext.Error.Set(span, true)
|
||||
@@ -5130,7 +5130,7 @@ func (s *OpenTracingLayerPostStore) GetPostAfterTime(channelID string, time int6
|
||||
return result, err
|
||||
}
|
||||
|
||||
func (s *OpenTracingLayerPostStore) GetPostIdAfterTime(channelID string, time int64) (string, error) {
|
||||
func (s *OpenTracingLayerPostStore) GetPostIdAfterTime(channelID string, time int64, collapsedThreads bool) (string, error) {
|
||||
origCtx := s.Root.Store.Context()
|
||||
span, newCtx := tracing.StartSpanWithParentByContext(s.Root.Store.Context(), "PostStore.GetPostIdAfterTime")
|
||||
s.Root.Store.SetContext(newCtx)
|
||||
@@ -5139,7 +5139,7 @@ func (s *OpenTracingLayerPostStore) GetPostIdAfterTime(channelID string, time in
|
||||
}()
|
||||
|
||||
defer span.Finish()
|
||||
result, err := s.PostStore.GetPostIdAfterTime(channelID, time)
|
||||
result, err := s.PostStore.GetPostIdAfterTime(channelID, time, collapsedThreads)
|
||||
if err != nil {
|
||||
span.LogFields(spanlog.Error(err))
|
||||
ext.Error.Set(span, true)
|
||||
@@ -5148,7 +5148,7 @@ func (s *OpenTracingLayerPostStore) GetPostIdAfterTime(channelID string, time in
|
||||
return result, err
|
||||
}
|
||||
|
||||
func (s *OpenTracingLayerPostStore) GetPostIdBeforeTime(channelID string, time int64) (string, error) {
|
||||
func (s *OpenTracingLayerPostStore) GetPostIdBeforeTime(channelID string, time int64, collapsedThreads bool) (string, error) {
|
||||
origCtx := s.Root.Store.Context()
|
||||
span, newCtx := tracing.StartSpanWithParentByContext(s.Root.Store.Context(), "PostStore.GetPostIdBeforeTime")
|
||||
s.Root.Store.SetContext(newCtx)
|
||||
@@ -5157,7 +5157,7 @@ func (s *OpenTracingLayerPostStore) GetPostIdBeforeTime(channelID string, time i
|
||||
}()
|
||||
|
||||
defer span.Finish()
|
||||
result, err := s.PostStore.GetPostIdBeforeTime(channelID, time)
|
||||
result, err := s.PostStore.GetPostIdBeforeTime(channelID, time, collapsedThreads)
|
||||
if err != nil {
|
||||
span.LogFields(spanlog.Error(err))
|
||||
ext.Error.Set(span, true)
|
||||
|
||||
Ссылка в новой задаче
Block a user