Skip to content

Commit

Permalink
Merge 5334823 into 3a729ac
Browse files Browse the repository at this point in the history
  • Loading branch information
Hoshinonyaruko authored Apr 22, 2024
2 parents 3a729ac + 5334823 commit 2cb26e7
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions handlers/message_parser.go
Original file line number Diff line number Diff line change
Expand Up @@ -978,13 +978,8 @@ func RevertTransformedText(data interface{}, msgtype string, api openapi.OpenAPI

// 从trimmedPrefix中去除前后空格(可能会有bug)
trimmedPrefix = strings.TrimSpace(trimmedPrefix)

if trimmedPrefix == "" {
matched = false
break
}

if strings.HasPrefix(messageText, trimmedPrefix) {
// trimmedPrefix如果是""就会导致任意内容都是true,所以不能是""
if strings.HasPrefix(messageText, trimmedPrefix) && trimmedPrefix != "" {
matched = true
break
}
Expand Down

0 comments on commit 2cb26e7

Please sign in to comment.