mirror of
https://github.com/cjdenio/jia.git
synced 2024-11-21 23:23:39 +00:00
Add a # to ignore messages
This would allow for coordination when you can't send another number. for example: ``` A 15 B 16 *B deletes 16* B #hey 16 was already counted - here jia does not go brr
This commit is contained in:
parent
ad7207c15f
commit
bc8d295e0c
1 changed files with 2 additions and 1 deletions
|
@ -9,6 +9,7 @@ import (
|
|||
"sort"
|
||||
"strconv"
|
||||
"time"
|
||||
"strings"
|
||||
|
||||
"github.com/slack-go/slack"
|
||||
"github.com/slack-go/slack/slackevents"
|
||||
|
@ -23,7 +24,7 @@ func HandleInnerEvent(slackClient *slack.Client, innerEvent *slackevents.EventsA
|
|||
|
||||
func onMessage(slackClient *slack.Client, event *slackevents.MessageEvent) {
|
||||
// Ignore messages that aren't in the target channel, or are non-user messages.
|
||||
if event.Channel != jiaConfig.ChannelID || event.User == "USLACKBOT" || event.User == "" {
|
||||
if event.Channel != jiaConfig.ChannelID || event.User == "USLACKBOT" || event.User == "" || strings.HasPrefix(event.Text, "#") {
|
||||
return
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue