@@ -30,10 +30,7 @@ import { createStaticReplyToModeResolver } from "openclaw/plugin-sdk/conversatio
3030import { createChannelDirectoryAdapter } from "openclaw/plugin-sdk/directory-runtime" ;
3131import { listResolvedDirectoryUserEntriesFromAllowFrom } from "openclaw/plugin-sdk/directory-runtime" ;
3232import { createLazyRuntimeModule } from "openclaw/plugin-sdk/lazy-runtime" ;
33- import {
34- isNumericTargetId ,
35- sendPayloadWithChunkedTextAndMedia ,
36- } from "openclaw/plugin-sdk/reply-payload" ;
33+ import { sendPayloadWithChunkedTextAndMedia } from "openclaw/plugin-sdk/reply-payload" ;
3734import {
3835 createComputedAccountStatusAdapter ,
3936 createDefaultChannelRuntimeState ,
@@ -74,6 +71,11 @@ function normalizeZaloMessagingTarget(raw: string): string | undefined {
7471 return trimmed . replace ( / ^ ( z a l o | z l ) : / i, "" ) . trim ( ) ;
7572}
7673
74+ function looksLikeZaloChatId ( raw : string , normalized ?: string ) : boolean {
75+ const target = normalizeZaloMessagingTarget ( normalized ?? raw ) ;
76+ return Boolean ( target ) ;
77+ }
78+
7779const loadZaloChannelRuntime = createLazyRuntimeModule ( ( ) => import ( "./channel.runtime.js" ) ) ;
7880const zaloSetupWizard = createZaloSetupWizardProxy (
7981 async ( ) => ( await import ( "./setup-surface.js" ) ) . zaloSetupWizard ,
@@ -234,7 +236,7 @@ export const zaloPlugin: ChannelPlugin<ResolvedZaloAccount, ZaloProbeResult> =
234236 normalizeTarget : normalizeZaloMessagingTarget ,
235237 resolveOutboundSessionRoute : ( params ) => resolveZaloOutboundSessionRoute ( params ) ,
236238 targetResolver : {
237- looksLikeId : isNumericTargetId ,
239+ looksLikeId : looksLikeZaloChatId ,
238240 hint : "<chatId>" ,
239241 } ,
240242 } ,
0 commit comments