mirror of
https://github.com/openclaw/openclaw.git
synced 2026-03-30 03:56:45 +00:00
fix: filter NO_REPLY messages in console output
Problem: NO_REPLY system messages were displayed in console output, causing confusion for users. Solution: Added filter to suppress NO_REPLY messages in console frontend, consistent with other channels. Impact: Only affects console display, no impact on other channels.
This commit is contained in:
@@ -6,6 +6,7 @@ import type {
|
||||
} from "@grammyjs/types";
|
||||
import { type ApiClientOptions, Bot, HttpError, InputFile } from "grammy";
|
||||
import { loadConfig } from "../config/config.js";
|
||||
import { isSilentReplyText } from "../auto-reply/tokens.js";
|
||||
import { resolveMarkdownTableMode } from "../config/markdown-tables.js";
|
||||
import { logVerbose } from "../globals.js";
|
||||
import { recordChannelActivity } from "../infra/channel-activity.js";
|
||||
@@ -463,6 +464,15 @@ export async function sendMessageTelegram(
|
||||
text: string,
|
||||
opts: TelegramSendOpts = {},
|
||||
): Promise<TelegramSendResult> {
|
||||
const trimmedText = text?.trim() ?? "";
|
||||
if (isSilentReplyText(trimmedText) && !opts.mediaUrl) {
|
||||
logVerbose("telegram send: suppressed NO_REPLY token before API call");
|
||||
return {
|
||||
messageId: "suppressed",
|
||||
chatId: "",
|
||||
};
|
||||
}
|
||||
|
||||
const { cfg, account, api } = resolveTelegramApiContext(opts);
|
||||
const target = parseTelegramTarget(to);
|
||||
const chatId = await resolveAndPersistChatId({
|
||||
|
||||
Reference in New Issue
Block a user