Skip to content

Commit 73943a0

Browse files
authored
Merge pull request #1741 from AIFlowML/fix/slack-1384-media-type-attachments
fix(client-slack): implement Media type properties in message attachments #1384
2 parents aec371f + 7bbfa92 commit 73943a0

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

packages/client-slack/jest.config.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/** @type {import('ts-jest').JestConfigWithTsJest} */
2-
module.exports = {
2+
export default {
33
preset: 'ts-jest',
44
testEnvironment: 'node',
55
roots: ['<rootDir>/src'],

packages/client-slack/src/messages.ts

+10
Original file line numberDiff line numberDiff line change
@@ -255,6 +255,16 @@ export class MessageManager {
255255
`${event.thread_ts}-${this.runtime.agentId}`
256256
)
257257
: undefined,
258+
attachments: event.text
259+
? [{
260+
id: stringToUuid(`${event.ts}-attachment`),
261+
url: '', // Since this is text content, no URL is needed
262+
title: 'Text Attachment',
263+
source: 'slack',
264+
description: 'Text content from Slack message',
265+
text: cleanedText
266+
}]
267+
: undefined,
258268
};
259269

260270
const memory: Memory = {

0 commit comments

Comments
 (0)