Add mentionUserInThreadHeader option. Fixes #152

master
Dragory 2018-09-20 22:03:28 +03:00
parent 2f04ed8359
commit 68af488663
2 changed files with 7 additions and 2 deletions

View File

@ -65,6 +65,7 @@ const defaultConfig = {
"allowMove": false,
"typingProxy": false,
"typingProxyReverse": false,
"mentionUserInThreadHeader": false,
"enableGreeting": false,
"greetingMessage": null,

View File

@ -125,8 +125,12 @@ async function createNewThreadForUser(user, quiet = false) {
const accountAge = humanizeDuration(Date.now() - user.createdAt, {largest: 2, round: true});
infoHeaderItems.push(`ACCOUNT AGE **${accountAge}**`);
// User id
infoHeaderItems.push(`ID **${user.id}**`);
// User id (and mention, if enabled)
if (config.mentionUserInThreadHeader) {
infoHeaderItems.push(`ID **${user.id}** (<@!${user.id}>)`);
} else {
infoHeaderItems.push(`ID **${user.id}**`);
}
let infoHeader = infoHeaderItems.join(', ');