Add an icon for bot messages. Closes #1172 (#1729)

This commit is contained in:
Gabe Kangas
2022-03-06 20:09:55 -08:00
committed by GitHub
parent 6e0e33dedb
commit 78c27ddbdd
8 changed files with 154 additions and 131 deletions

View File

@@ -99,7 +99,7 @@ export default function Message(props) {
`;
return html`<${SystemMessage} contents=${contents} />`;
} else if (type === SOCKET_MESSAGE_TYPES.USER_JOINED) {
const { displayName } = user;
const { displayName, isBot } = user;
const isAuthorModerator = checkIsModerator(message);
const messageAuthorFlair = isAuthorModerator
? html`<img
@@ -108,6 +108,7 @@ export default function Message(props) {
src="/img/moderator-nobackground.svg"
/>`
: null;
const contents = html`<div>
<span class="font-bold">${messageAuthorFlair}${displayName}</span>
${' '}joined the chat.