mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 02:21:13 +00:00
fix: Allow username to be set in Redis chat memory (#13926)
This commit is contained in:
@@ -30,7 +30,7 @@ export class MemoryRedisChat implements INodeType {
|
|||||||
name: 'memoryRedisChat',
|
name: 'memoryRedisChat',
|
||||||
icon: 'file:redis.svg',
|
icon: 'file:redis.svg',
|
||||||
group: ['transform'],
|
group: ['transform'],
|
||||||
version: [1, 1.1, 1.2, 1.3, 1.4],
|
version: [1, 1.1, 1.2, 1.3, 1.4, 1.5],
|
||||||
description: 'Stores the chat history in Redis.',
|
description: 'Stores the chat history in Redis.',
|
||||||
defaults: {
|
defaults: {
|
||||||
name: 'Redis Chat Memory',
|
name: 'Redis Chat Memory',
|
||||||
@@ -133,6 +133,9 @@ export class MemoryRedisChat implements INodeType {
|
|||||||
database: credentials.database as number,
|
database: credentials.database as number,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
if (credentials.user && nodeVersion >= 1.5) {
|
||||||
|
redisOptions.username = credentials.user as string;
|
||||||
|
}
|
||||||
if (credentials.password) {
|
if (credentials.password) {
|
||||||
redisOptions.password = credentials.password as string;
|
redisOptions.password = credentials.password as string;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user