This commit is contained in:
shoopea 2020-01-06 12:07:42 +08:00
parent a41df7dd7e
commit 032dc04083

1
msg.go
View File

@ -13,6 +13,7 @@ func getMsgParsingRule(m *ChatWarsMessage) (*MessageParsingRule, error) {
var i int
for i = 0; i < len(msgParsingRules); i++ {
if msgParsingRules[i].re.FindStringSubmatch(m.Text) != nil {
log.Printf("getMsgParsingRule : text matching with %s.\n", msgParsingRules[i].Description)
if (msgParsingRules[i].ChatID64 == 0 || msgParsingRules[i].ChatID64 == m.ChatID64) && (msgParsingRules[i].SenderUserID64 == 0 || msgParsingRules[i].SenderUserID64 == m.TGSenderUserID64) {
break
}