mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-17 00:40:14 +01:00
✉️ fix: Fallback For User Name In Email Templates (#6620)
This commit is contained in:
parent
c381fc3ff0
commit
d60f2ed50b
2 changed files with 11 additions and 4 deletions
|
|
@ -91,7 +91,7 @@ const sendVerificationEmail = async (user) => {
|
||||||
subject: 'Verify your email',
|
subject: 'Verify your email',
|
||||||
payload: {
|
payload: {
|
||||||
appName: process.env.APP_TITLE || 'LibreChat',
|
appName: process.env.APP_TITLE || 'LibreChat',
|
||||||
name: user.name,
|
name: user.name || user.username || user.email,
|
||||||
verificationLink: verificationLink,
|
verificationLink: verificationLink,
|
||||||
year: new Date().getFullYear(),
|
year: new Date().getFullYear(),
|
||||||
},
|
},
|
||||||
|
|
@ -278,7 +278,7 @@ const requestPasswordReset = async (req) => {
|
||||||
subject: 'Password Reset Request',
|
subject: 'Password Reset Request',
|
||||||
payload: {
|
payload: {
|
||||||
appName: process.env.APP_TITLE || 'LibreChat',
|
appName: process.env.APP_TITLE || 'LibreChat',
|
||||||
name: user.name,
|
name: user.name || user.username || user.email,
|
||||||
link: link,
|
link: link,
|
||||||
year: new Date().getFullYear(),
|
year: new Date().getFullYear(),
|
||||||
},
|
},
|
||||||
|
|
@ -331,7 +331,7 @@ const resetPassword = async (userId, token, password) => {
|
||||||
subject: 'Password Reset Successfully',
|
subject: 'Password Reset Successfully',
|
||||||
payload: {
|
payload: {
|
||||||
appName: process.env.APP_TITLE || 'LibreChat',
|
appName: process.env.APP_TITLE || 'LibreChat',
|
||||||
name: user.name,
|
name: user.name || user.username || user.email,
|
||||||
year: new Date().getFullYear(),
|
year: new Date().getFullYear(),
|
||||||
},
|
},
|
||||||
template: 'passwordReset.handlebars',
|
template: 'passwordReset.handlebars',
|
||||||
|
|
@ -414,7 +414,7 @@ const resendVerificationEmail = async (req) => {
|
||||||
subject: 'Verify your email',
|
subject: 'Verify your email',
|
||||||
payload: {
|
payload: {
|
||||||
appName: process.env.APP_TITLE || 'LibreChat',
|
appName: process.env.APP_TITLE || 'LibreChat',
|
||||||
name: user.name,
|
name: user.name || user.username || user.email,
|
||||||
verificationLink: verificationLink,
|
verificationLink: verificationLink,
|
||||||
year: new Date().getFullYear(),
|
year: new Date().getFullYear(),
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -765,12 +765,19 @@
|
||||||
* @typedef {import('mongoose').Schema} MongooseSchema
|
* @typedef {import('mongoose').Schema} MongooseSchema
|
||||||
* @memberof typedefs
|
* @memberof typedefs
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @exports MongoFile
|
* @exports MongoFile
|
||||||
* @typedef {import('@librechat/data-schemas').IMongoFile} MongoFile
|
* @typedef {import('@librechat/data-schemas').IMongoFile} MongoFile
|
||||||
* @memberof typedefs
|
* @memberof typedefs
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @exports MongoUser
|
||||||
|
* @typedef {import('@librechat/data-schemas').IUser} MongoUser
|
||||||
|
* @memberof typedefs
|
||||||
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @exports ObjectId
|
* @exports ObjectId
|
||||||
* @typedef {import('mongoose').Types.ObjectId} ObjectId
|
* @typedef {import('mongoose').Types.ObjectId} ObjectId
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue