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 Sakurapainting
parent 9063a6a25f
commit 028c4bf71d

View file

@ -357,6 +357,7 @@ func (c *QQChannel) Send(ctx context.Context, msg bus.OutboundMessage) ([]string
"error": err.Error(), "error": err.Error(),
}) })
return nil, fmt.Errorf("qq send: %w", channels.ErrTemporary) return nil, fmt.Errorf("qq send: %w", channels.ErrTemporary)
)
} }
if sentMsg == nil { if sentMsg == nil {