add display name to the email variables

This commit is contained in:
negue
2018-11-29 20:00:05 +01:00
parent 817c943860
commit fb3a9740bd
2 changed files with 5 additions and 3 deletions

View File

@@ -19,7 +19,7 @@ let api = {};
* @apiSuccess {Object} data.flags The flags of the message
* @apiSuccess {Number} data.flagCount The number of flags the message has
* @apiSuccess {UUID} data.uuid The user id of the author of the message, or of the recipient if `sent` is true
* @apiSuccess {String} data.user The username of the author of the message, or of the recipient if `sent` is true
* @apiSuccess {String} data.user The Display Name of the author of the message, or of the recipient if `sent` is true
*
* @apiUse MessageNotFound
* @apiUse MessageIdRequired

View File

@@ -18,12 +18,14 @@ export default class ChatReporter {
{name: 'MESSAGE_TIME', content: (new Date(message.timestamp)).toString()},
{name: 'MESSAGE_TEXT', content: message.text},
{name: 'REPORTER_USERNAME', content: this.user.profile.name},
{name: 'REPORTER_DISPLAYNAME', content: this.user.profile.name},
{name: 'REPORTER_USERNAME', content: this.user.auth.local.username},
{name: 'REPORTER_UUID', content: this.user._id},
{name: 'REPORTER_EMAIL', content: reporterEmailContent},
{name: 'REPORTER_MODAL_URL', content: `/static/front/#?memberId=${this.user._id}`},
{name: 'AUTHOR_USERNAME', content: message.user},
{name: 'AUTHOR_DISPLAYNAME', content: message.user},
{name: 'AUTHOR_USERNAME', content: message.username},
{name: 'AUTHOR_UUID', content: message.uuid},
{name: 'AUTHOR_EMAIL', content: this.authorEmail},
{name: 'AUTHOR_MODAL_URL', content: `/static/front/#?memberId=${message.uuid}`},