mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-22 11:20:15 +01:00
refactor: update getAppConfig calls in Conversation and Message models to include user role for temporary chat expiration
This commit is contained in:
parent
57513f7ac9
commit
8f89fdc802
2 changed files with 6 additions and 2 deletions
|
|
@ -57,7 +57,9 @@ async function saveMessage(req, params, metadata) {
|
|||
|
||||
if (req?.body?.isTemporary) {
|
||||
try {
|
||||
const appConfig = await getAppConfig();
|
||||
const appConfig = await getAppConfig({
|
||||
role: req.user.role,
|
||||
});
|
||||
update.expiredAt = createTempChatExpirationDate(appConfig?.interfaceConfig);
|
||||
} catch (err) {
|
||||
logger.error('Error creating temporary chat expiration date:', err);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue