Skip to content

Commit

Permalink
fix: /me messages in history having the colon thingy (#422)
Browse files Browse the repository at this point in the history
  • Loading branch information
vyneer authored Feb 20, 2024
1 parent 738d642 commit 9ed36f6
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
11 changes: 11 additions & 0 deletions assets/chat/js/messages/ChatUserMessage.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,4 +117,15 @@ export default class ChatUserMessage extends ChatMessage {
this.ui.classList.toggle('msg-own', isOwn);
this.isown = isOwn;
}

/**
* @param {boolean} isSlashMe
*/
setSlashMe(isSlashMe) {
this.ui.classList.toggle('msg-me', isSlashMe);
const ctrl = this.ui.querySelector('.ctrl');
if (ctrl) ctrl.textContent = isSlashMe ? '' : ': ';

this.slashme = isSlashMe;
}
}
1 change: 1 addition & 0 deletions assets/chat/js/window.js
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ class ChatWindow extends EventEmitter {
message.highlight(chat.shouldHighlightMessage(message));
if (message.type === MessageTypes.USER) {
message.setContinued(this.isContinued(message, this.messages[i - 1]));
message.setSlashMe(message.slashme);
message.setTag(chat.taggednicks.get(username));
}
message.setTagTitle(chat.taggednotes.get(username) ?? '');
Expand Down

0 comments on commit 9ed36f6

Please sign in to comment.