MM-51482_Create Apps Category and link to bots DM (#22918)
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
13f1d0fdc5
Коммит
1051925eec
@@ -871,11 +871,11 @@ func (s *RetryLayerChannelStore) CreateInitialSidebarCategories(userID string, o
|
||||
|
||||
}
|
||||
|
||||
func (s *RetryLayerChannelStore) CreateSidebarCategory(userID string, teamID string, newCategory *model.SidebarCategoryWithChannels) (*model.SidebarCategoryWithChannels, error) {
|
||||
func (s *RetryLayerChannelStore) CreateSidebarCategory(userID string, teamID string, newCategory *model.SidebarCategoryWithChannels, options ...*store.SidebarCategorySearchOpts) (*model.SidebarCategoryWithChannels, error) {
|
||||
|
||||
tries := 0
|
||||
for {
|
||||
result, err := s.ChannelStore.CreateSidebarCategory(userID, teamID, newCategory)
|
||||
result, err := s.ChannelStore.CreateSidebarCategory(userID, teamID, newCategory, options...)
|
||||
if err == nil {
|
||||
return result, nil
|
||||
}
|
||||
@@ -1144,6 +1144,27 @@ func (s *RetryLayerChannelStore) GetAllDirectChannelsForExportAfter(limit int, a
|
||||
|
||||
}
|
||||
|
||||
func (s *RetryLayerChannelStore) GetBotChannelsByUser(userID string, opts store.ChannelSearchOpts) (model.ChannelList, error) {
|
||||
|
||||
tries := 0
|
||||
for {
|
||||
result, err := s.ChannelStore.GetBotChannelsByUser(userID, opts)
|
||||
if err == nil {
|
||||
return result, nil
|
||||
}
|
||||
if !isRepeatableError(err) {
|
||||
return result, err
|
||||
}
|
||||
tries++
|
||||
if tries >= 3 {
|
||||
err = errors.Wrap(err, "giving up after 3 consecutive repeatable transaction failures")
|
||||
return result, err
|
||||
}
|
||||
timepkg.Sleep(100 * timepkg.Millisecond)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
func (s *RetryLayerChannelStore) GetByName(team_id string, name string, allowFromCache bool) (*model.Channel, error) {
|
||||
|
||||
tries := 0
|
||||
@@ -1948,11 +1969,11 @@ func (s *RetryLayerChannelStore) GetSidebarCategories(userID string, opts *store
|
||||
|
||||
}
|
||||
|
||||
func (s *RetryLayerChannelStore) GetSidebarCategoriesForTeamForUser(userID string, teamID string) (*model.OrderedSidebarCategories, error) {
|
||||
func (s *RetryLayerChannelStore) GetSidebarCategoriesForTeamForUser(userID string, teamID string, options ...*store.SidebarCategorySearchOpts) (*model.OrderedSidebarCategories, error) {
|
||||
|
||||
tries := 0
|
||||
for {
|
||||
result, err := s.ChannelStore.GetSidebarCategoriesForTeamForUser(userID, teamID)
|
||||
result, err := s.ChannelStore.GetSidebarCategoriesForTeamForUser(userID, teamID, options...)
|
||||
if err == nil {
|
||||
return result, nil
|
||||
}
|
||||
@@ -1969,11 +1990,11 @@ func (s *RetryLayerChannelStore) GetSidebarCategoriesForTeamForUser(userID strin
|
||||
|
||||
}
|
||||
|
||||
func (s *RetryLayerChannelStore) GetSidebarCategory(categoryID string) (*model.SidebarCategoryWithChannels, error) {
|
||||
func (s *RetryLayerChannelStore) GetSidebarCategory(categoryID string, options ...*store.SidebarCategorySearchOpts) (*model.SidebarCategoryWithChannels, error) {
|
||||
|
||||
tries := 0
|
||||
for {
|
||||
result, err := s.ChannelStore.GetSidebarCategory(categoryID)
|
||||
result, err := s.ChannelStore.GetSidebarCategory(categoryID, options...)
|
||||
if err == nil {
|
||||
return result, nil
|
||||
}
|
||||
@@ -2878,11 +2899,11 @@ func (s *RetryLayerChannelStore) UpdateMultipleMembers(members []*model.ChannelM
|
||||
|
||||
}
|
||||
|
||||
func (s *RetryLayerChannelStore) UpdateSidebarCategories(userID string, teamID string, categories []*model.SidebarCategoryWithChannels) ([]*model.SidebarCategoryWithChannels, []*model.SidebarCategoryWithChannels, error) {
|
||||
func (s *RetryLayerChannelStore) UpdateSidebarCategories(userID string, teamID string, categories []*model.SidebarCategoryWithChannels, options ...*store.SidebarCategorySearchOpts) ([]*model.SidebarCategoryWithChannels, []*model.SidebarCategoryWithChannels, error) {
|
||||
|
||||
tries := 0
|
||||
for {
|
||||
result, resultVar1, err := s.ChannelStore.UpdateSidebarCategories(userID, teamID, categories)
|
||||
result, resultVar1, err := s.ChannelStore.UpdateSidebarCategories(userID, teamID, categories, options...)
|
||||
if err == nil {
|
||||
return result, resultVar1, nil
|
||||
}
|
||||
|
||||
Ссылка в новой задаче
Block a user