Skip to content

Commit

Permalink
[#3] [command] npm run release
Browse files Browse the repository at this point in the history
  • Loading branch information
8398a7 committed Jun 27, 2020
1 parent 0f58c8f commit afba0e9
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -11467,6 +11467,7 @@ exports.Cancelled = 'cancelled';
exports.Custom = 'custom';
exports.Always = 'always';
const groupMention = ['here', 'channel'];
const subteamMention = 'subteam^';
class Client {
constructor(props, token, webhookUrl) {
this.with = props;
Expand Down Expand Up @@ -11681,6 +11682,12 @@ class Client {
short: true,
};
}
getIdString(id) {
if (id.includes(subteamMention))
return `<!${id}>`;
else
return `<@${id}>`;
}
mentionText(mention, status) {
if (!this.with.if_mention.includes(status) &&
this.with.if_mention !== exports.Always) {
Expand All @@ -11693,7 +11700,7 @@ class Client {
else if (normalized !== '') {
const text = normalized
.split(',')
.map(userId => `<@${userId}>`)
.map(id => this.getIdString(id))
.join(' ');
return `${text} `;
}
Expand Down

0 comments on commit afba0e9

Please sign in to comment.