MM-35125 CRT: Mention badge on threads doesn't appear until refresh (#17504)

Этот коммит содержится в:
Eli Yukelzon
2021-04-27 10:18:20 +03:00
коммит произвёл GitHub
родитель cd4d322e4a
Коммит ba302cf512
7 изменённых файлов: 99 добавлений и 5 удалений

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

@@ -8794,6 +8794,24 @@ func (s *OpenTracingLayerThreadStore) GetPosts(threadID string, since int64) ([]
return result, err
}
func (s *OpenTracingLayerThreadStore) GetThreadFollowers(threadID string) ([]string, error) {
origCtx := s.Root.Store.Context()
span, newCtx := tracing.StartSpanWithParentByContext(s.Root.Store.Context(), "ThreadStore.GetThreadFollowers")
s.Root.Store.SetContext(newCtx)
defer func() {
s.Root.Store.SetContext(origCtx)
}()
defer span.Finish()
result, err := s.ThreadStore.GetThreadFollowers(threadID)
if err != nil {
span.LogFields(spanlog.Error(err))
ext.Error.Set(span, true)
}
return result, err
}
func (s *OpenTracingLayerThreadStore) GetThreadForUser(userID string, teamID string, threadId string, extended bool) (*model.ThreadResponse, error) {
origCtx := s.Root.Store.Context()
span, newCtx := tracing.StartSpanWithParentByContext(s.Root.Store.Context(), "ThreadStore.GetThreadForUser")