mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-30 07:03:42 +00:00
refactor: use channel target resolution APIs (#85814)
* refactor: use channel target resolution apis * refactor: satisfy delivery lint * refactor: remove unused target parsing shim * fix: preserve routed cron topic targets
This commit is contained in:
committed by
GitHub
parent
fd2a9adbe6
commit
c4f0da00a9
@@ -180,7 +180,7 @@ describe("plugin-sdk channel-route", () => {
|
||||
).toBe(false);
|
||||
});
|
||||
|
||||
it("resolves parsed route targets through an injected channel grammar", () => {
|
||||
it("keeps deprecated parser wrapper wired for public SDK compatibility", () => {
|
||||
expect(
|
||||
resolveChannelRouteTargetWithParser({
|
||||
channel: "Mock",
|
||||
|
||||
@@ -44,12 +44,14 @@ export type ChannelRouteTargetInput = Pick<
|
||||
|
||||
export type ChannelRouteKeyInput = ChannelRouteRef | ChannelRouteTargetInput;
|
||||
|
||||
/** @deprecated Use `messaging.resolveOutboundSessionRoute` for provider-specific target grammar. */
|
||||
export type ChannelRouteExplicitTarget = {
|
||||
to: string;
|
||||
threadId?: string | number;
|
||||
chatType?: ChannelRouteChatType;
|
||||
};
|
||||
|
||||
/** @deprecated Use `messaging.resolveOutboundSessionRoute` for provider-specific target grammar. */
|
||||
export type ChannelRouteExplicitTargetParser = (
|
||||
channel: string,
|
||||
rawTarget: string,
|
||||
@@ -125,6 +127,7 @@ export type ChannelRouteParsedTarget = ChannelRouteTargetInput & {
|
||||
chatType?: ChannelRouteChatType;
|
||||
};
|
||||
|
||||
/** @deprecated Use `messaging.resolveOutboundSessionRoute` for provider-specific target grammar. */
|
||||
export function resolveChannelRouteTargetWithParser(params: {
|
||||
channel: string;
|
||||
rawTarget?: string | null;
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
/** @deprecated Use `openclaw/plugin-sdk/channel-targets`. */
|
||||
export {
|
||||
buildMessagingTarget,
|
||||
ensureTargetId,
|
||||
|
||||
Reference in New Issue
Block a user