Merge pull request #84 from songquanpeng/main

Fork Sync: Update from parent repository
This commit is contained in:
quzard 2023-06-25 23:18:13 +08:00 committed by GitHub
commit 85068859ba
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -108,7 +108,7 @@ var channelSyncLock sync.RWMutex
func InitChannelCache() {
newChannelId2channel := make(map[int]*Channel)
var channels []*Channel
DB.Find(&channels)
DB.Where("status = ?", common.ChannelStatusEnabled).Find(&channels)
for _, channel := range channels {
newChannelId2channel[channel.Id] = channel
}