Don't display pipe in chatr name if not needed

This commit is contained in:
Ajay Ramachandran 2021-08-03 12:45:34 -04:00
parent de1f18612f
commit 81d0c0cab1

View file

@ -36,7 +36,7 @@ export async function openWarningChat(warningMessage: string): Promise<void> {
const publicUserID = await utils.getHash(Config.config.userID);
openChat({
displayName: `${userName ? `${userName} | `: ``}${userName !== publicUserID ? publicUserID : ``}`,
displayName: `${userName ? userName : ``}${userName !== publicUserID ? ` | ${publicUserID}` : ``}`,
composerInitialValue: `I got a warning and want to know what I need to do to improve. ` +
`Warning reason: ${warningMessage.match(/Warning reason: '(.+)'/)[1]}`,
customDescription: chrome.i18n.getMessage("warningChatInfo")