Skip to content

Commit

Permalink
log slack thread (#2716)
Browse files Browse the repository at this point in the history
  • Loading branch information
spolu authored Nov 30, 2023
1 parent 2ed7448 commit 994a78f
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion connectors/src/connectors/slack/temporal/activities.ts
Original file line number Diff line number Diff line change
Expand Up @@ -566,16 +566,31 @@ export async function syncThread(
}
} while (next_cursor);

const documentId = `slack-${channelId}-thread-${threadTs}`;

if (documentId === "slack-C01LV3NED08-thread-1701302546.665219") {
console.log(
"slack-C01LV3NED08-thread-1701302546.665219 allMessages-unfiltered",
allMessages
);
}

const botUserId = await getBotUserIdMemoized(slackClient);
allMessages = allMessages.filter((m) => m.user !== botUserId);

if (documentId === "slack-C01LV3NED08-thread-1701302546.665219") {
console.log(
"slack-C01LV3NED08-thread-1701302546.665219 allMessages-filtered",
allMessages
);
}

const text = await formatMessagesForUpsert(
channelId,
allMessages,
connectorId,
slackClient
);
const documentId = `slack-${channelId}-thread-${threadTs}`;

const firstMessage = allMessages[0];
let sourceUrl: string | undefined = undefined;
Expand Down

0 comments on commit 994a78f

Please sign in to comment.