Skip to content

Commit

Permalink
Better dedupe (#134)
Browse files Browse the repository at this point in the history
  • Loading branch information
O-Mutt committed Jul 12, 2023
1 parent 8fa220a commit 7b03c03
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "hubot-plusplus-expanded",
"version": "3.4.11",
"version": "3.4.12",
"description": "A hubot script for micro praise",
"main": "index.js",
"engines": {
Expand Down
2 changes: 1 addition & 1 deletion src/help.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ module.exports = function help(robot) {

robot.respond(RegExpPlusPlus.getHelp(), respondWithHelpGuidance);
robot.respond(new RegExp(/(plusplus version|-v|--version)/, 'i'), (msg) => {
msg.send(`${Helpers.capitalizeFirstLetter(msg.robot.name)} [${pjson.name}](${pjson.repository.url}): [v${pjson.version}](https://www.npmjs.com/package/${pjson.name}).`);
msg.send(`${Helpers.capitalizeFirstLetter(msg.robot.name)} <${pjson.repository.url}|${pjson.name}> <https://www.npmjs.com/package/${pjson.name}|v${pjson.version}>.`);
});

robot.hear(new RegExp('how much .*point.*', 'i'), tellHowMuchPointsAreWorth);
Expand Down
2 changes: 1 addition & 1 deletion src/messageHandlers/plusplus.js
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ module.exports = function plusplus(robot) {
if (mentions) {
to = mentions
.filter((men) => men.type === 'user')
.filter((men, pos, self) => self.indexOf(s => s.id === men.id) === pos);
.filter((single, index, allMentions) => index === allMentions.findIndex((m) => m.id === single.id));
}
const cleanReason = Helpers.cleanAndEncode(reason);
const increment = operator.match(RegExpPlusPlus.positiveOperators) ? 1 : -1;
Expand Down

0 comments on commit 7b03c03

Please sign in to comment.