Skip to content

Commit 4d9134f

Browse files
committed
fix(whatsapp): remove implicit [openclaw] self-chat prefix
1 parent 10fe82f commit 4d9134f

File tree

3 files changed

+29
-1
lines changed

3 files changed

+29
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ Docs: https://docs.openclaw.ai
3030

3131
### Fixes
3232

33+
- WhatsApp/self-chat response prefix fallback: stop forcing `"[openclaw]"` as the implicit outbound response prefix when no identity name or response prefix is configured, so blank/default prefix settings no longer inject branding text unexpectedly in self-chat flows. (#27962) Thanks @ecanmor.
3334
- Memory/QMD search result decoding: accept `qmd search` hits that only include `file` URIs (for example `qmd://collection/path.md`) without `docid`, resolve them through managed collection roots, and keep multi-collection results keyed by file fallback so valid QMD hits no longer collapse to empty `memory_search` output. (#28181) Thanks @0x76696265.
3435
- Memory/QMD collection-name conflict recovery: when `qmd collection add` fails because another collection already occupies the same `path + pattern`, detect the conflicting collection from `collection list`, remove it, and retry add so agent-scoped managed collections are created deterministically instead of being silently skipped; also add warning-only fallback when qmd metadata is unavailable to avoid destructive guesses. (#25496) Thanks @Ramsbaby.
3536
- Slack/app_mention race dedupe: when `app_mention` dispatch wins while same-`ts` `message` prepare is still in-flight, suppress the later message dispatch so near-simultaneous Slack deliveries do not produce duplicate replies; keep single-retry behavior and add regression coverage for both dropped and successful message-prepare outcomes. (#37033) Thanks @Takhoffman.

src/web/auto-reply/monitor/process-message.inbound-contract.test.ts

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,33 @@ describe("web processMessage inbound contract", () => {
219219
expect(dispatcherOptions?.responsePrefix).toBe("[Mainbot]");
220220
});
221221

222+
it("does not force an [openclaw] response prefix in self-chats when identity is unset", async () => {
223+
capturedDispatchParams = undefined;
224+
225+
await processMessage(
226+
makeProcessMessageArgs({
227+
routeSessionKey: "agent:main:whatsapp:direct:+1555",
228+
groupHistoryKey: "+1555",
229+
cfg: {
230+
messages: {},
231+
session: { store: sessionStorePath },
232+
} as unknown as ReturnType<typeof import("../../../config/config.js").loadConfig>,
233+
msg: {
234+
id: "msg1",
235+
from: "+1555",
236+
to: "+1555",
237+
selfE164: "+1555",
238+
chatType: "direct",
239+
body: "hi",
240+
},
241+
}),
242+
);
243+
244+
// oxlint-disable-next-line typescript/no-explicit-any
245+
const dispatcherOptions = (capturedDispatchParams as any)?.dispatcherOptions;
246+
expect(dispatcherOptions?.responsePrefix).toBeUndefined();
247+
});
248+
222249
it("clears pending group history when the dispatcher does not queue a final reply", async () => {
223250
capturedCtx = undefined;
224251
const groupHistories = new Map<string, Array<{ sender: string; body: string }>>([

src/web/auto-reply/monitor/process-message.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ export async function processMessage(params: {
279279
const responsePrefix =
280280
prefixOptions.responsePrefix ??
281281
(configuredResponsePrefix === undefined && isSelfChat
282-
? (resolveIdentityNamePrefix(params.cfg, params.route.agentId) ?? "[openclaw]")
282+
? resolveIdentityNamePrefix(params.cfg, params.route.agentId)
283283
: undefined);
284284

285285
const inboundHistory =

0 commit comments

Comments
 (0)