Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
julianlam committed May 13, 2024
1 parent e82b070 commit 9eb9695
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions library.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,11 @@ Mentions.notify = async function ({ post }) {
}

const noMentionGroups = getNoMentionGroups();
matches = _.uniq(matches.map(match => slugify(match))).filter(match => match && !noMentionGroups.includes(match));
matches = _.uniq(
matches
.map(match => slugify(match.slice(1)))
.filter(match => match && !noMentionGroups.includes(match))
);
if (!matches.length) {
return;
}
Expand Down Expand Up @@ -185,7 +189,8 @@ Mentions.notifyMessage = async (hookData) => {
}
const { message } = hookData;
const { roomId } = message;
matches = _.uniq(matches.map(slugify));
matches = _.uniq(matches.map(match => slugify(match.slice(1))));

const [matchedUids, roomData] = await Promise.all([
getUidsToNotify(matches),
Messaging.getRoomData(roomId),
Expand Down

0 comments on commit 9eb9695

Please sign in to comment.