This commit is contained in:
cdle
2021-10-11 17:34:04 +08:00
parent 888ce3074d
commit 2e1b8131aa
2 changed files with 4 additions and 3 deletions
+2 -1
View File
@@ -82,9 +82,10 @@ func handleMessage(sender Sender) {
defer sender.Finish()
key := fmt.Sprintf("u=%v&c=%v&i=%v", sender.GetUserID(), sender.GetChatID(), sender.GetImType())
fmt.Println(key)
fmt.Println(waits.Load(key))
if v, ok := waits.Load(key); ok {
c := v.(Carry)
fmt.Println(c, "-----")
if m := regexp.MustCompile(c.Pattern).FindString(sender.GetContent()); m != "" {
c.Chan <- m
sender.Reply(<-c.Result)