Skip to content

Commit

Permalink
🩹 fix match case
Browse files Browse the repository at this point in the history
  • Loading branch information
AntoineKM committed Dec 16, 2023
1 parent 50b4552 commit 844af5a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .changeset/twelve-chairs-thank.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"dixt-plugin-react": patch
---

Fix match case
6 changes: 3 additions & 3 deletions packages/dixt-plugin-react/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export const optionsDefaults = {

const dixtPluginReact: DixtPlugin = (
instance,
optionsValue?: DixtPluginReactOptions,
optionsValue?: DixtPluginReactOptions

Check failure on line 25 in packages/dixt-plugin-react/src/index.ts

View workflow job for this annotation

GitHub Actions / Build, lint, and test on Node 16.x and ubuntu-latest

Insert `,`

Check failure on line 25 in packages/dixt-plugin-react/src/index.ts

View workflow job for this annotation

GitHub Actions / release

Insert `,`

Check failure on line 25 in packages/dixt-plugin-react/src/index.ts

View workflow job for this annotation

GitHub Actions / Build, lint, and test on Node 18.x and ubuntu-latest

Insert `,`

Check failure on line 25 in packages/dixt-plugin-react/src/index.ts

View workflow job for this annotation

GitHub Actions / Build, lint, and test on Node 20.x and ubuntu-latest

Insert `,`
) => {
const options = merge({}, optionsDefaults, optionsValue);
if (options.channels.length === 0) {
Expand All @@ -35,15 +35,15 @@ const dixtPluginReact: DixtPlugin = (
if (message.channel.id === channel.id) {
if (channel.matchs && channel.matchs.length > 0) {
channel.matchs.forEach((match) => {
if (message.content.includes(match)) {
if (message.content.toLowerCase().includes(match.toLowerCase())) {
message.react(channel.emoji);
}
});
} else {
message.react(channel.emoji);
}
}
},
}

Check failure on line 46 in packages/dixt-plugin-react/src/index.ts

View workflow job for this annotation

GitHub Actions / Build, lint, and test on Node 16.x and ubuntu-latest

Insert `,`

Check failure on line 46 in packages/dixt-plugin-react/src/index.ts

View workflow job for this annotation

GitHub Actions / release

Insert `,`

Check failure on line 46 in packages/dixt-plugin-react/src/index.ts

View workflow job for this annotation

GitHub Actions / Build, lint, and test on Node 18.x and ubuntu-latest

Insert `,`

Check failure on line 46 in packages/dixt-plugin-react/src/index.ts

View workflow job for this annotation

GitHub Actions / Build, lint, and test on Node 20.x and ubuntu-latest

Insert `,`
);
});

Expand Down

0 comments on commit 844af5a

Please sign in to comment.