fix: avoid leak details contained in the error string

This fmt.Printf adds an extra stdout error line on send failures. Besides duplicating the logger entry above, it can leak details contained in the error string (potentially including QQ identifiers) and makes it harder to control output in embedded deployments. Consider removing this print and relying on logger.ErrorCF (or gating any user-facing output behind a CLI-specific layer).

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
SakoroYou 2026-03-27 19:02:09 +08:00 committed by GitHub
parent f290108fae
commit 7d44ce72cf
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -353,7 +353,6 @@ func (c *QQChannel) Send(ctx context.Context, msg bus.OutboundMessage) error {
"chat_kind": chatKind, "chat_kind": chatKind,
"error": err.Error(), "error": err.Error(),
}) })
fmt.Printf("QQ send failed: %v\n", err)
return fmt.Errorf("qq send: %w", channels.ErrTemporary) return fmt.Errorf("qq send: %w", channels.ErrTemporary)
} }