Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions packages/chat/src/chat.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1707,10 +1707,8 @@ export class Chat<
initialMessage: Message,
isSubscribedContext = false
): Thread<TState> {
// Parse thread ID to get channel info
// Format: "adapter:channel:thread"
const parts = threadId.split(":");
const channelId = parts[1] || "";
// Parse thread ID to get channel ID with adapter
const channelId = adapter.channelIdFromThreadId(threadId);

// Check if this is a DM
const isDM = adapter.isDM?.(threadId) ?? false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ describe("Replay Tests - Actions & Reactions", () => {
userId: "U00FAKEUSER1",
userName: "testuser",
adapterName: "slack",
channelId: "C00FAKECHAN1",
channelId: "slack:C00FAKECHAN1",
isDM: false,
});

Expand All @@ -91,7 +91,7 @@ describe("Replay Tests - Actions & Reactions", () => {
added: true,
userId: "U00FAKEUSER1",
adapterName: "slack",
channelId: "C00FAKECHAN1",
channelId: "slack:C00FAKECHAN1",
messageId: "1767326126.896109",
isDM: false,
});
Expand All @@ -110,7 +110,7 @@ describe("Replay Tests - Actions & Reactions", () => {
userId: "U00FAKEUSER1",
userName: "testuser",
adapterName: "slack",
channelId: "C00FAKECHAN1",
channelId: "slack:C00FAKECHAN1",
isDM: false,
});

Expand All @@ -129,7 +129,7 @@ describe("Replay Tests - Actions & Reactions", () => {
userId: "U00FAKEUSER1",
userName: "testuser",
adapterName: "slack",
channelId: "C00FAKECHAN1",
channelId: "slack:C00FAKECHAN1",
isDM: false,
});

Expand Down
2 changes: 1 addition & 1 deletion packages/integration-tests/src/replay-channel.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ describe("Replay Tests - Channel", () => {
userId: "U00FAKEUSER1",
userName: "testuser",
adapterName: "slack",
channelId: "C00FAKECHAN1",
channelId: "slack:C00FAKECHAN1",
isDM: false,
});
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ describe("Replay Tests - Modal privateMetadata", () => {
userId: "U0A8WUV28QM",
userName: "sd0a90bkva4s_user",
adapterName: "slack",
channelId: "C0A9D9RTBMF",
channelId: "slack:C0A9D9RTBMF",
isDM: false,
});

Expand Down
4 changes: 2 additions & 2 deletions packages/integration-tests/src/replay-modals.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ describe("Replay Tests - Modals", () => {
userId: "U00FAKEUSER2",
userName: "jane.smith",
adapterName: "slack",
channelId: "C00FAKECHAN2",
channelId: "slack:C00FAKECHAN2",
isDM: false,
});

Expand Down Expand Up @@ -254,7 +254,7 @@ describe("Replay Tests - Modals", () => {
expect(capturedAction?.threadId).toBe(
"slack:C00FAKECHAN3:1771126602.612659"
);
expect(capturedAction?.thread?.channelId).toBe("C00FAKECHAN3");
expect(capturedAction?.thread?.channelId).toBe("slack:C00FAKECHAN3");
});

it("should allow editing relatedMessage from ephemeral modal submission", async () => {
Expand Down