Skip to content

Commit

Permalink
chore: Add config.app.allowedSpeakersHighlight feature flag
Browse files Browse the repository at this point in the history
  • Loading branch information
edfletcher committed Jan 14, 2024
1 parent 2ca8bc9 commit 767553f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions config/default.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ const _config = {
avatarGenerator: 'robohash',
allowedSpeakers: [],
allowedSpeakersRoleId: null,
allowedSpeakersHighlight: true,
// options are
// 'replace' (replace IRC nick with Discord ASers)
// 'bracket' (turns into: IRCNick[DiscordASers])
Expand Down
4 changes: 4 additions & 0 deletions discord.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,10 @@ function registerButtonHandler (buttonId, handlerFunc) {
}

const allowedSpeakersMentionString = (s = ['[', ']']) => {
if (!config.app.allowedSpeakersHighlight) {
return s;
}

if (!config.app.allowedSpeakers.length) {
return '';
}
Expand Down

0 comments on commit 767553f

Please sign in to comment.