Automatic channel category sorting (#30866)
* Automatic channel category sorting * Fix types * AIed * Fix issue where categories are updated for all users * Move all logic to server, clean up * PR feedback * Fix lint --------- Co-authored-by: Mattermost Build <build@mattermost.com>
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
c6a11763a8
Коммит
25a4839a9e
@@ -137,6 +137,7 @@ func channelSliceColumns(isSelect bool, prefix ...string) []string {
|
||||
p + "TotalMsgCountRoot",
|
||||
p + "LastRootPostAt",
|
||||
p + "BannerInfo",
|
||||
p + "DefaultCategoryName",
|
||||
}
|
||||
|
||||
if isSelect {
|
||||
@@ -172,6 +173,7 @@ func channelToSlice(channel *model.Channel) []any {
|
||||
channel.TotalMsgCountRoot,
|
||||
channel.LastRootPostAt,
|
||||
channel.BannerInfo,
|
||||
channel.DefaultCategoryName,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -834,7 +836,8 @@ func (s SqlChannelStore) updateChannelT(transaction *sqlxTxWrapper, channel *mod
|
||||
Shared=:Shared,
|
||||
TotalMsgCountRoot=:TotalMsgCountRoot,
|
||||
LastRootPostAt=:LastRootPostAt,
|
||||
BannerInfo=:BannerInfo
|
||||
BannerInfo=:BannerInfo,
|
||||
DefaultCategoryName=:DefaultCategoryName
|
||||
WHERE Id=:Id`, channel)
|
||||
if err != nil {
|
||||
if IsUniqueConstraintError(err, []string{"Name", "channels_name_teamid_key"}) {
|
||||
|
||||
Ссылка в новой задаче
Block a user