Skip to content

Commit

Permalink
[slack] Add attached filenames in slack messages (#8618)
Browse files Browse the repository at this point in the history
  • Loading branch information
tdraier authored Nov 13, 2024
1 parent e0ead77 commit 1539e8a
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion connectors/src/connectors/slack/temporal/activities.ts
Original file line number Diff line number Diff line change
Expand Up @@ -800,11 +800,20 @@ export async function formatMessagesForUpsert({
const messageDate = new Date(parseInt(message.ts as string, 10) * 1000);
const messageDateStr = formatDateForUpsert(messageDate);

const filesInfo = message.files
? "\n" +
message.files
.map((file) => {
return `Attached file : ${file.name} ( ${file.mimetype} )`;
})
.join("\n")
: "";

return {
messageDate,
dateStr: messageDateStr,
userName,
text: text,
text: text + filesInfo,
content: text + "\n",
sections: [],
};
Expand Down

0 comments on commit 1539e8a

Please sign in to comment.