Skip to content

Commit

Permalink
First Message Highlight 1.1.1
Browse files Browse the repository at this point in the history
* Fixed: Properly check if `First Message` highlight setting is enabled before highlighting a message
  • Loading branch information
Lordmau5 committed Jan 16, 2024
1 parent 2404340 commit c967c33
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
8 changes: 5 additions & 3 deletions src/first-message-highlighter/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -179,9 +179,9 @@ class FirstMessageHighlight extends Addon {
}
});

this.chat.addHighlightReason('first-message', "First message from a user during this session");
this.chat.addHighlightReason('first-time-chatter', "First messages from a user new to the channel");
this.chat.addHighlightReason('returning-chatter', "First messages from a user returning to the channel");
this.chat.addHighlightReason('first-message', 'First message from a user during this session');
this.chat.addHighlightReason('first-time-chatter', 'First messages from a user new to the channel');
this.chat.addHighlightReason('returning-chatter', 'First messages from a user returning to the channel');

const outerThis = this;
this.messageHighlighter = {
Expand Down Expand Up @@ -259,6 +259,8 @@ class FirstMessageHighlight extends Addon {
}

highlightMessage(ctx, msg) {
if (!this.settings.get('first_message_highlight.enabled')) return;

if (this.settings.get('first_message_highlight.only_moderated_channels')) {
if (!this.chat.context.get('context.moderator'))
return;
Expand Down
4 changes: 2 additions & 2 deletions src/first-message-highlighter/manifest.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"enabled": true,
"requires": [],
"version": "1.1.0",
"version": "1.1.1",
"icon": "https://i.imgur.com/Db2zP1l.png",
"short_name": "first_msg_highlight",
"name": "First Message Highlight",
"author": "deko_ration",
"description": "Addon to highlight the first message of a user during the current session. Useful for community-driven chats and welcoming.",
"settings": "add_ons.first_message_highlight",
"created": "2021-12-01T14:32:46.254Z",
"updated": "2024-01-16T20:13:28.279Z"
"updated": "2024-01-16T20:17:22.813Z"
}

0 comments on commit c967c33

Please sign in to comment.