Commit 87d0d12d by Calcium-Ion Committed by GitHub

Merge pull request #1647 from aotsukiqx/main

fix: update channel.go fix #1641
parents 3d7a05bd 3b50fcb7
......@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment