Skip to content

Commit

Permalink
fix quick operation no response without at_sender.
Browse files Browse the repository at this point in the history
  • Loading branch information
Mrs4s committed Aug 2, 2020
1 parent e2227d5 commit 4be73b2
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions coolq/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -362,12 +362,14 @@ func (bot *CQBot) CQHandleQuickOperation(context, operation gjson.Result) MSG {
msgType := context.Get("message_type").Str
reply := operation.Get("reply")
if reply.Exists() {
at := true
if operation.Get("at_sender").Exists() {
at = operation.Get("at_sender").Bool()
}
/*
at := true
if operation.Get("at_sender").Exists() {
at = operation.Get("at_sender").Bool()
}
*/
// TODO: 处理at字段
if msgType == "group" && at {
if msgType == "group" {
bot.CQSendGroupMessage(context.Get("group_id").Int(), reply)
}
if msgType == "private" {
Expand Down

0 comments on commit 4be73b2

Please sign in to comment.