fix unicode space issue
This commit is contained in:
parent
11028cafc3
commit
aced8e8561
|
@ -87,6 +87,8 @@ func main() {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// fmt.Println(msg.Content)
|
||||||
|
|
||||||
content := msg.Content
|
content := msg.Content
|
||||||
if msg.IsSendByGroup() && !msg.IsAt() {
|
if msg.IsSendByGroup() && !msg.IsAt() {
|
||||||
return
|
return
|
||||||
|
@ -96,14 +98,7 @@ func main() {
|
||||||
atheader := fmt.Sprintf("@%s", self.NickName)
|
atheader := fmt.Sprintf("@%s", self.NickName)
|
||||||
//fmt.Println(atheader)
|
//fmt.Println(atheader)
|
||||||
if strings.HasPrefix(content, atheader) {
|
if strings.HasPrefix(content, atheader) {
|
||||||
content = strings.TrimLeft(content[len(atheader):], " \t\n")
|
content = strings.TrimLeft(content[len(atheader):], " \t\n")
|
||||||
for {
|
|
||||||
if strings.HasPrefix(content, " ") {
|
|
||||||
content = content[1:]
|
|
||||||
} else {
|
|
||||||
break
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//fmt.Println(content)
|
//fmt.Println(content)
|
||||||
|
|
Loading…
Reference in New Issue