Skip to content

Commit b2e359a

Browse files
authored
fix: Allow username to be set in Redis chat memory (n8n-io#13926)
1 parent 2e9d3ad commit b2e359a

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

packages/@n8n/nodes-langchain/nodes/memory/MemoryRedisChat/MemoryRedisChat.node.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ export class MemoryRedisChat implements INodeType {
3030
name: 'memoryRedisChat',
3131
icon: 'file:redis.svg',
3232
group: ['transform'],
33-
version: [1, 1.1, 1.2, 1.3, 1.4],
33+
version: [1, 1.1, 1.2, 1.3, 1.4, 1.5],
3434
description: 'Stores the chat history in Redis.',
3535
defaults: {
3636
name: 'Redis Chat Memory',
@@ -133,6 +133,9 @@ export class MemoryRedisChat implements INodeType {
133133
database: credentials.database as number,
134134
};
135135

136+
if (credentials.user && nodeVersion >= 1.5) {
137+
redisOptions.username = credentials.user as string;
138+
}
136139
if (credentials.password) {
137140
redisOptions.password = credentials.password as string;
138141
}

0 commit comments

Comments
 (0)