This commit is contained in:
Scott Little 2023-05-14 23:56:52 +01:00 committed by GitHub
commit a3095f1ea3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -10,6 +10,7 @@ import (
"strconv"
"strings"
"time"
"strings"
"github.com/slack-go/slack"
"github.com/slack-go/slack/slackevents"
@ -24,7 +25,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
}