mirror of
https://github.com/linux-do/new-api.git
synced 2025-12-26 08:35:58 +08:00
fix: channel auto ban
This commit is contained in:
@@ -228,7 +228,7 @@ func testAllChannels(notify bool) error {
|
||||
Error: *openaiErr,
|
||||
LocalError: false,
|
||||
}
|
||||
if isChannelEnabled && service.ShouldDisableChannel(&openAiErrWithStatus) && ban {
|
||||
if isChannelEnabled && service.ShouldDisableChannel(channel.Type, &openAiErrWithStatus) && ban {
|
||||
service.DisableChannel(channel.Id, channel.Name, err.Error())
|
||||
}
|
||||
if !isChannelEnabled && service.ShouldEnableChannel(err, openaiErr, channel.Status) {
|
||||
|
||||
Reference in New Issue
Block a user