Merge pull request #2507 from cytown/allow

bug fix for allowFrom contains empty string
This commit is contained in:
美電球
2026-04-13 23:39:54 +08:00
committed by GitHub
+10
View File
@@ -103,6 +103,16 @@ func NewBaseChannel(
allowList []string,
opts ...BaseChannelOption,
) *BaseChannel {
isEmpty := true
for _, s := range allowList {
if s != "" {
isEmpty = false
break
}
}
if isEmpty {
allowList = []string{}
}
bc := &BaseChannel{
config: config,
bus: bus,