Add mentionUserInThreadHeader option. Fixes #152
parent
2f04ed8359
commit
68af488663
|
@ -65,6 +65,7 @@ const defaultConfig = {
|
||||||
"allowMove": false,
|
"allowMove": false,
|
||||||
"typingProxy": false,
|
"typingProxy": false,
|
||||||
"typingProxyReverse": false,
|
"typingProxyReverse": false,
|
||||||
|
"mentionUserInThreadHeader": false,
|
||||||
|
|
||||||
"enableGreeting": false,
|
"enableGreeting": false,
|
||||||
"greetingMessage": null,
|
"greetingMessage": null,
|
||||||
|
|
|
@ -125,8 +125,12 @@ async function createNewThreadForUser(user, quiet = false) {
|
||||||
const accountAge = humanizeDuration(Date.now() - user.createdAt, {largest: 2, round: true});
|
const accountAge = humanizeDuration(Date.now() - user.createdAt, {largest: 2, round: true});
|
||||||
infoHeaderItems.push(`ACCOUNT AGE **${accountAge}**`);
|
infoHeaderItems.push(`ACCOUNT AGE **${accountAge}**`);
|
||||||
|
|
||||||
// User id
|
// User id (and mention, if enabled)
|
||||||
infoHeaderItems.push(`ID **${user.id}**`);
|
if (config.mentionUserInThreadHeader) {
|
||||||
|
infoHeaderItems.push(`ID **${user.id}** (<@!${user.id}>)`);
|
||||||
|
} else {
|
||||||
|
infoHeaderItems.push(`ID **${user.id}**`);
|
||||||
|
}
|
||||||
|
|
||||||
let infoHeader = infoHeaderItems.join(', ');
|
let infoHeader = infoHeaderItems.join(', ');
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue