Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
phsl
/
new-api
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
87d0d12d
authored
Aug 25, 2025
by
Calcium-Ion
Committed by
GitHub
Aug 25, 2025
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1647 from aotsukiqx/main
fix: update channel.go fix #1641
parents
3d7a05bd
3b50fcb7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
0 deletions
+8
-0
service/channel.go
+8
-0
No files found.
service/channel.go
View file @
87d0d12d
...
@@ -18,6 +18,14 @@ func formatNotifyType(channelId int, status int) string {
...
@@ -18,6 +18,14 @@ func formatNotifyType(channelId int, status int) string {
// disable & notify
// disable & notify
func
DisableChannel
(
channelError
types
.
ChannelError
,
reason
string
)
{
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
)
success
:=
model
.
UpdateChannelStatus
(
channelError
.
ChannelId
,
channelError
.
UsingKey
,
common
.
ChannelStatusAutoDisabled
,
reason
)
if
success
{
if
success
{
subject
:=
fmt
.
Sprintf
(
"通道「%s」(#%d)已被禁用"
,
channelError
.
ChannelName
,
channelError
.
ChannelId
)
subject
:=
fmt
.
Sprintf
(
"通道「%s」(#%d)已被禁用"
,
channelError
.
ChannelName
,
channelError
.
ChannelId
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment