Skip to content
This repository has been archived by the owner on Aug 2, 2020. It is now read-only.

Commit

Permalink
Fix group request bug
Browse files Browse the repository at this point in the history
  • Loading branch information
stdrc committed Apr 17, 2017
1 parent 7b9fc15 commit 14e4f74
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
1 change: 1 addition & 0 deletions docs/Post.md
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,7 @@ Authorization: token kSLuTF2GC2Q4q4ugm3
| `post_type` | string | `"request"` | 上报类型 |
| `request_type` | string | `"group"` | 请求类型 |
| `sub_type` | string | `"add"``"invite"` | 请求子类型,分别表示加群请求、邀请登录号入群 |
| `group_id` | number | - | 群号 |
| `user_id` | number | - | 发送请求的 QQ 号 |
| `message` | string | - | 验证信息 |
| `flag` | string | - | 请求 flag,在调用处理请求的 API 时需要传入 |
Expand Down
4 changes: 2 additions & 2 deletions io.github.richardchien.coolqhttpapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"ret": 1, // 返回码,固定为1
"apiver": 9, // Api版本,本SDK为9
"name": "HTTP API", // 应用名称
"version": "1.1.1", // 应用版本
"version_id": 11, // 应用顺序版本(每次发布时至少+1)
"version": "1.1.2", // 应用版本
"version_id": 12, // 应用顺序版本(每次发布时至少+1)
"author": "Richard Chien", // 应用作者
"description": "使酷 Q 支持通过 HTTP 上报事件信息及调用接口",
"event": [// 事件列表,同一事件类型可重复定义(发布前请删除无用事件)
Expand Down
2 changes: 1 addition & 1 deletion src/app.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
#define CQAPPID "io.github.richardchien.coolqhttpapi"
#define CQAPPINFO CQAPIVERTEXT "," CQAPPID
#define CQAPPNAME "CoolQ HTTP API Plugin"
#define CQAPPVER "v1.1.1"
#define CQAPPVER "v1.1.2"
#define CQAPPFULLNAME CQAPPNAME " " CQAPPVER
3 changes: 2 additions & 1 deletion src/appmain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -602,11 +602,12 @@ CQEVENT(int32_t, __eventRequest_AddGroup, 32)
sub_type_str = "invite";
break;
}
json_t *json = json_pack("{s:s, s:s, s:s, s:i, s:I, s:s, s:s}",
json_t *json = json_pack("{s:s, s:s, s:s, s:i, s:I, s:I, s:s, s:s}",
"post_type", "request",
"request_type", "group",
"sub_type", sub_type_str,
"time", send_time,
"group_id", from_group,
"user_id", from_qq,
"message", gbk_to_utf8(msg).c_str(),
"flag", gbk_to_utf8(response_flag).c_str());
Expand Down

0 comments on commit 14e4f74

Please sign in to comment.