Skip to content

Commit

Permalink
fix(client-slack): implement Media type properties in message attachm…
Browse files Browse the repository at this point in the history
…ents - elizaOS#1384
  • Loading branch information
AIFlowML committed Jan 3, 2025
1 parent 76d4f42 commit f92f6ca
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion packages/client-slack/jest.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/** @type {import('ts-jest').JestConfigWithTsJest} */
module.exports = {
export default {
preset: 'ts-jest',
testEnvironment: 'node',
roots: ['<rootDir>/src'],
Expand Down
10 changes: 10 additions & 0 deletions packages/client-slack/src/messages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,16 @@ export class MessageManager {
`${event.thread_ts}-${this.runtime.agentId}`
)
: undefined,
attachments: event.text
? [{
id: stringToUuid(`${event.ts}-attachment`),
url: '', // Since this is text content, no URL is needed
title: 'Text Attachment',
source: 'slack',
description: 'Text content from Slack message',
text: cleanedText
}]
: undefined,
};

const memory: Memory = {
Expand Down

0 comments on commit f92f6ca

Please sign in to comment.