diff --git a/src/config.js b/src/config.js index 54ad5c9..7c2e0bb 100644 --- a/src/config.js +++ b/src/config.js @@ -65,6 +65,7 @@ const defaultConfig = { "allowMove": false, "typingProxy": false, "typingProxyReverse": false, + "mentionUserInThreadHeader": false, "enableGreeting": false, "greetingMessage": null, diff --git a/src/data/threads.js b/src/data/threads.js index f4564f9..baa9abe 100644 --- a/src/data/threads.js +++ b/src/data/threads.js @@ -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(', ');