Skip to content

Commit 29e8ca6

Browse files
committed
fix(slack): keep reply policy internal
1 parent 34025aa commit 29e8ca6

2 files changed

Lines changed: 7 additions & 9 deletions

File tree

‎extensions/slack/src/send.ts‎

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import type { MessageMetadata } from "@slack/types";
44
import type { Block, ChatPostMessageArguments, KnownBlock, WebClient } from "@slack/web-api";
55
import {
66
createMessageReceiptFromOutboundResults,
7-
createReplyToDeliveryPolicy,
87
type ChannelMessageUnknownSendContext,
98
type ChannelMessageUnknownSendReconciliationResult,
109
type MessageReceipt,
@@ -999,12 +998,14 @@ export async function reconcileSlackUnknownSend(
999998
}
1000999
const readClient = opts?.client ?? createSlackWebClient(readToken);
10011000
const writeClient = opts?.client ?? (writeToken ? getSlackWriteClient(writeToken) : undefined);
1001+
const payloadReplyToId = ctx.payloads[0]?.replyToId;
10021002
const effectiveReplyToId = Object.hasOwn(ctx, "effectiveReplyToId")
10031003
? normalizeOptionalString(ctx.effectiveReplyToId)
1004-
: createReplyToDeliveryPolicy({
1005-
replyToId: ctx.replyToId,
1006-
replyToMode: ctx.replyToMode,
1007-
}).resolveCurrentReplyTo(ctx.payloads[0] ?? {}).replyToId;
1004+
: payloadReplyToId != null
1005+
? normalizeOptionalString(payloadReplyToId)
1006+
: ctx.replyToMode === "off"
1007+
? undefined
1008+
: normalizeOptionalString(ctx.replyToId);
10081009
const threadTs = resolveSlackThreadTsValue({
10091010
replyToId: effectiveReplyToId,
10101011
threadId: ctx.threadId,

‎src/plugin-sdk/channel-outbound.ts‎

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,10 +68,7 @@ export {
6868
export type { OutboundDeliveryFormattingOptions } from "../infra/outbound/formatting.js";
6969
export { resolveAgentOutboundIdentity } from "../infra/outbound/identity.js";
7070
export type { OutboundIdentity } from "../infra/outbound/identity.js";
71-
export {
72-
createReplyToDeliveryPolicy,
73-
createReplyToFanout,
74-
} from "../infra/outbound/reply-policy.js";
71+
export { createReplyToFanout } from "../infra/outbound/reply-policy.js";
7572
export type { ReplyToResolution } from "../infra/outbound/reply-policy.js";
7673
export { resolveOutboundSendDep } from "../infra/outbound/send-deps.js";
7774
export type { OutboundSendDeps } from "../infra/outbound/send-deps.js";

0 commit comments

Comments
 (0)