Merge pull request #1647 from aotsukiqx/main

fix: update channel.go fix #1641
This commit is contained in:
Calcium-Ion
2025-08-25 10:25:06 +08:00
committed by GitHub

View File

@@ -18,6 +18,14 @@ func formatNotifyType(channelId int, status int) string {
// disable & notify
func DisableChannel(channelError types.ChannelError, reason string) {
// 检查是否启用自动禁用功能
if !channelError.AutoBan {
if common.DebugEnabled {
common.SysLog(fmt.Sprintf("通道「%s」#%d未启用自动禁用功能跳过禁用操作", channelError.ChannelName, channelError.ChannelId))
}
return
}
success := model.UpdateChannelStatus(channelError.ChannelId, channelError.UsingKey, common.ChannelStatusAutoDisabled, reason)
if success {
subject := fmt.Sprintf("通道「%s」#%d已被禁用", channelError.ChannelName, channelError.ChannelId)