mirror of
https://github.com/YspCoder/clawgo.git
synced 2026-05-20 23:57:30 +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 (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"strings"
|
||||||
"sync"
|
"sync"
|
||||||
"sync/atomic"
|
"sync/atomic"
|
||||||
|
|
||||||
@@ -291,6 +292,11 @@ func (m *Manager) dispatchOutbound(ctx context.Context) {
|
|||||||
channel, exists := cur[msg.Channel]
|
channel, exists := cur[msg.Channel]
|
||||||
|
|
||||||
if !exists {
|
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.WarnCF("channels", "Unknown channel for outbound message", map[string]interface{}{
|
||||||
logger.FieldChannel: msg.Channel,
|
logger.FieldChannel: msg.Channel,
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user