Commit cef129ef authored by Mrs4s's avatar Mrs4s Committed by GitHub

Merge pull request #109 from SJTU-Plus/master

fix #103
parents 1a1f860d 1fac06f5
...@@ -404,12 +404,12 @@ func (bot *CQBot) CQHandleQuickOperation(context, operation gjson.Result) MSG { ...@@ -404,12 +404,12 @@ func (bot *CQBot) CQHandleQuickOperation(context, operation gjson.Result) MSG {
} }
case "request": case "request":
reqType := context.Get("request_type").Str reqType := context.Get("request_type").Str
if context.Get("approve").Bool() { if operation.Get("approve").Exists() {
if reqType == "friend" { if reqType == "friend" {
bot.CQProcessFriendRequest(context.Get("flag").Str, true) bot.CQProcessFriendRequest(context.Get("flag").Str, operation.Get("approve").Bool())
} }
if reqType == "group" { if reqType == "group" {
bot.CQProcessGroupRequest(context.Get("flag").Str, context.Get("sub_type").Str, true) bot.CQProcessGroupRequest(context.Get("flag").Str, context.Get("sub_type").Str, operation.Get("approve").Bool())
} }
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment