diff --git a/js/twitch/module.js b/js/twitch/module.js index 11591e2..8106af5 100644 --- a/js/twitch/module.js +++ b/js/twitch/module.js @@ -100,7 +100,7 @@ async function twitchChatMessage(data) { message: { username: userID, color, - displayName: userName, + displayName: fullUserName, message : text, firstMessage, isReply, @@ -142,18 +142,18 @@ async function twitchChatMessage(data) { } } - let fullUserName = userName; - let userPronouns = await getUserPronouns('twitch', data.message.username); + let userName = fullUserName; if (showTwitchPronouns == true) { - fullUserName = userName + userPronouns; + let userPronouns = await getUserPronouns('twitch', data.message.username); + userName = userPronouns + fullUserName; } const messageData = { classes: classes.join(' '), avatar, badges, - fullUserName, + userName, color, message, shared: sharedChat, @@ -637,4 +637,4 @@ async function getUserPronouns(platform, username) { return pronoun; } -} \ No newline at end of file +}