Skip to content

Commit

Permalink
remove bare oncall mention functionality
Browse files Browse the repository at this point in the history
  • Loading branch information
after-ephemera committed Jan 19, 2024
1 parent 928028d commit 7c0959a
Showing 1 changed file with 1 addition and 15 deletions.
16 changes: 1 addition & 15 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -268,23 +268,9 @@ const handleBotCommands = async (
debug("who command");
// who command
postMessage(message_data.channel, "are the humans OnCall.", false);
} else if (
// need to support mobile which adds : after a mention
message.match(new RegExp("^" + bot_tag() + ":?$"))
) {
debug("bot mention only");
// This is an explicit mention of the bot only.
mentionOnCalls(channel.name, "get in here! :point_up_2:");
} else {
debug("oncall tag mention");
// default
let preText =
(message_data.user ? " <@" + message_data.user + ">" : bot_tag()) +
' said _"';
mentionOnCalls(
channel.name,
preText + message.substring(bot_tag().length + 1) + '_"'
);
// todo: show available commands
}
}
};
Expand Down

0 comments on commit 7c0959a

Please sign in to comment.