mirror of
https://github.com/YspCoder/clawgo.git
synced 2026-04-14 15:57:29 +08:00
channels: ignore internal/system outbound pseudo-channels to avoid noisy unknown-channel warnings
This commit is contained in:
@@ -9,6 +9,7 @@ package channels
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"strings"
|
||||
"sync"
|
||||
"sync/atomic"
|
||||
|
||||
@@ -291,6 +292,11 @@ func (m *Manager) dispatchOutbound(ctx context.Context) {
|
||||
channel, exists := cur[msg.Channel]
|
||||
|
||||
if !exists {
|
||||
ch := strings.ToLower(strings.TrimSpace(msg.Channel))
|
||||
if ch == "system" || ch == "internal" || ch == "" {
|
||||
// Internal/system pseudo channels are not externally dispatchable.
|
||||
continue
|
||||
}
|
||||
logger.WarnCF("channels", "Unknown channel for outbound message", map[string]interface{}{
|
||||
logger.FieldChannel: msg.Channel,
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user