Skip to content

Commit 0f0f2dd

Browse files
authored
fix: Webhook (#169)
1 parent d946563 commit 0f0f2dd

48 files changed

Lines changed: 127 additions & 730 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

docs/guides/gettingStarted/admin.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ import Image4 from './assets/admin.jpg';
185185

186186
![dashboard2](./assets/dashboard2.png)
187187

188-
选择你的 Data Source和job , 即可导入指标信息,如下图
188+
选择你的 Data Source和job 即可导入指标信息,如下图
189189

190190
![dashboard3](./assets/dashboard3.png)
191191

docs/guides/gettingStarted/nginxDomainConfig.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ sidebar_position: 7
1111

1212
- **open-im-server****chat** 成功启动。
1313
- **Nginx** 已成功安装,包括 SSL 模块。
14-
- 成功申请两个域名及其 SSL 证书,例如:`web.xx.xx` (用于 IM 服务端及 Web 端), `admin.xx.xx`(用于管理后台)。
14+
- 成功申请两个域名及其 SSL 证书,例如:`web.xx.xx` (用于 IM 服务端及 Web 端) `admin.xx.xx`(用于管理后台)。
1515
- 开放 443 和 80 端口。
1616

1717
## 2. 域名配置模板 📝

docs/restapi/commonFields.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ title: 常用结构体说明
1515
| ex | string | 1024 | 扩展字段,可自行扩展,建议封装成 JSON 字符串 | 字符串/JSON |
1616
| operationID | string | | 操作 ID,用于定位问题,保持唯一,建议用当前时间、随机数和 userID | 字符串 |
1717
| operatorUserID | string | 64 | 操作者,具体含义视上下文而定 | 字符串 |
18-
| groupID | string | 64 | 群 ID ,保证 IM 内唯一 | 字符串 |
18+
| groupID | string | 64 | 群 ID 保证 IM 内唯一 | 字符串 |
1919

2020
## PublicUserInfo
2121

docs/restapi/webhooks/group/applyJoinGroupBefore.mdx

Lines changed: 3 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -24,26 +24,12 @@ App 业务服务端可以通过该回调实时查看用户申请加入群组的
2424
## 接口说明
2525

2626
### 请求 URL 示例
27-
以下示例中 App 配置的回调 URL 为 `http://www.example.com/callbackCommand?contenttype=json`
27+
此处`CallbackCommand`为:`callbackBeforeJoinGroupCommand`
28+
2829
```plaintext
29-
http://www.example.com/callbackBeforeApplyMemberJoinGroupCommand?contenttype=json
30+
http://{WEBHOOK_ADDRESS}/callbackBeforeJoinGroupCommand?contenttype=json
3031
```
3132

32-
### 请求参数说明
33-
34-
| 参数 | 说明 |
35-
| --------------- | ------------------------------------------------- |
36-
| http | 请求协议为 HTTP,请求方式为 POST |
37-
| www.example.com | webhooks.yml 中的 url 字段,域名或主机名 |
38-
| CallbackCommand | 此处为:`callbackBeforeJoinGroupCommand` |
39-
| contenttype | 固定值为:JSON |
40-
41-
### Header
42-
43-
| header名 | 示例值 | 选填 | 类型 | 说明 |
44-
|:------------|:-------|:----|--------|---------------------|
45-
| operationID | 123456 | 必填 | string | 用于全局链路追踪,建议使用时间戳,在每个请求中独立 |
46-
4733
### 请求包示例
4834
```json
4935
{

docs/restapi/webhooks/group/createAfter.mdx

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -24,25 +24,11 @@ App 业务服务端可以通过该回调实时查看用户创建群组的信息
2424
## 接口说明
2525

2626
### 请求 URL 示例
27-
以下示例中 App 配置的回调 URL 为 `http://www.example.com/callbackCommand?contenttype=json`
27+
此处`CallbackCommand`为:`callbackAfterCreateGroupCommand`
2828
```plaintext
29-
http://www.example.com/callbackAfterCreateGroupCommand?contenttype=json
29+
http://{WEBHOOK_ADDRESS}/callbackAfterCreateGroupCommand?contenttype=json
3030
```
3131

32-
### 请求参数说明
33-
34-
| 参数 | 说明 |
35-
| --------------- | ------------------------------------------------- |
36-
| http | 请求协议为 HTTP,请求方式为 POST |
37-
| www.example.com | webhooks.yml 中的 url 字段,域名或主机名 |
38-
| CallbackCommand | 此处为:`callbackAfterCreateGroupCommand` |
39-
| contenttype | 固定值为:JSON |
40-
41-
### Header
42-
| header名 | 示例值 | 选填 | 类型 | 说明 |
43-
|:------------|:--------------|:----|--------|---------------------|
44-
| operationID | 1646445464564 | 必填 | string | 用于全局链路追踪,建议使用时间戳,在每个请求中独立 |
45-
4632
### 请求包示例
4733
```json
4834
{

docs/restapi/webhooks/group/createBefore.mdx

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -24,26 +24,11 @@ App 业务服务端可以通过该回调获取用户创建群组的请求,同
2424
## 接口说明
2525

2626
### 请求 URL 示例
27-
以下示例中 App 配置的回调 URL 为 `http://www.example.com/callbackCommand?contenttype=json`
27+
此处`CallbackCommand`为:`callbackBeforeCreateGroupCommand`
2828
```plaintext
29-
http://www.example.com/callbackBeforeCreateGroupCommand?contenttype=json
29+
http://{WEBHOOK_ADDRESS}/callbackBeforeCreateGroupCommand?contenttype=json
3030
```
3131

32-
### 请求参数说明
33-
34-
| 参数 | 说明 |
35-
| --------------- | ------------------------------------------------- |
36-
| http | 请求协议为 HTTP,请求方式为 POST |
37-
| www.example.com | webhooks.yml 中的 url 字段,域名或主机名 |
38-
| CallbackCommand | 此处为:`callbackBeforeCreateGroupCommand` |
39-
| contenttype | 固定值为:JSON |
40-
41-
### Header
42-
43-
| header名 | 示例值 | 选填 | 类型 | 说明 |
44-
|:------------|:--------------|:----|--------|---------------------|
45-
| operationID | 1646445464564 | 必填 | string | 用于全局链路追踪,建议使用时间戳,在每个请求中独立 |
46-
4732
### 请求包示例
4833
```json
4934
{

docs/restapi/webhooks/group/disMissGroupAfter.mdx

Lines changed: 3 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -25,26 +25,13 @@ App 业务服务端可以通过该回调获取群组解散的信息,包括:
2525
## 接口说明
2626

2727
### 请求 URL 示例
28-
以下示例中 App 配置的回调 URL 为 `http://www.example.com/callbackCommand?contenttype=json`
28+
此处`CallbackCommand`为:`callbackAfterDisMissGroupCommand`
2929
```plaintext
30-
http://www.example.com/callbackAfterUngroupCommand?contenttype=json
30+
http://{WEBHOOK_ADDRESS}/callbackAfterDisMissGroupCommand?contenttype=json
3131
```
3232

33-
### 请求参数说明
34-
35-
| 参数 | 说明 |
36-
| --------------- | ------------------------------------------------- |
37-
| http | 请求协议为 HTTP,请求方式为 POST |
38-
| www.example.com | webhooks.yml 中的 url 字段,域名或主机名 |
39-
| CallbackCommand | 此处为:callbackAfterDisMissGroupCommand |
40-
| contenttype | 固定值为:JSON |
41-
42-
### Header
43-
| header名 | 示例值 | 选填 | 类型 | 说明 |
44-
|:------------|:--------------|:----|--------|---------------------|
45-
| operationID | 1646445464564 | 必填 | string | 用于全局链路追踪,建议使用时间戳,在每个请求中独立 |
46-
4733
### 请求包示例
34+
4835
```json
4936
{
5037
"callbackCommand": "callbackAfterDisMissGroupCommand",
@@ -57,8 +44,6 @@ http://www.example.com/callbackAfterUngroupCommand?contenttype=json
5744
```
5845

5946

60-
61-
6247
### 请求包字段说明
6348

6449
| 对象 | 类型 | 描述 |

docs/restapi/webhooks/group/groupMsgRead.mdx

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -22,25 +22,11 @@ App 业务服务端可以通过该回调实时查看用户的单聊消息的已
2222
## 接口说明
2323

2424
### 请求 URL 示例
25-
以下示例中 App 配置的回调 URL 为 `http://www.example.com/callbackCommand?contenttype=json`
25+
此处`CallbackCommand`为:`callbackAfterGroupMsgReadCommand`
2626
```plaintext
27-
http://www.example.com/callbackGroupMsgReadCommand?contenttype=json
27+
http://{WEBHOOK_ADDRESS}/callbackAfterGroupMsgReadCommand?contenttype=json
2828
```
2929

30-
### 请求参数说明
31-
32-
| 参数 | 说明 |
33-
| --------------- | ------------------------------------------------- |
34-
| http | 请求协议为 HTTP,请求方式为 POST |
35-
| www.example.com | webhooks.yml 中的 url 字段,域名或主机名 |
36-
| CallbackCommand | 此处为:`callbackAfterGroupMsgReadCommand` |
37-
| contenttype | 固定值为:JSON |
38-
39-
### Header
40-
| header名 | 示例值 | 选填 | 类型 | 说明 |
41-
|:------------|:--------------|:----|--------|---------------------|
42-
| operationID | 1646445464564 | 必填 | string | 用于全局链路追踪,建议使用时间戳,在每个请求中独立 |
43-
4430
### 请求包示例
4531
```json
4632
{

docs/restapi/webhooks/group/inviteJoinGroupBefore.mdx

Lines changed: 3 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -25,25 +25,11 @@ App 业务服务端可以通过该回调实时查看群成员拉其他用户加
2525
## 接口说明
2626

2727
### 请求 URL 示例
28-
以下示例中 App 配置的回调 URL 为 `http://www.example.com/callbackCommand?contenttype=json`
28+
此处`CallbackCommand`为:`callbackBeforeInviteJoinGroupCommand`
2929
```plaintext
30-
http://www.example.com/CallbackBeforeInviteMemberJoinGroupCommand?contenttype=json
30+
http://{WEBHOOK_ADDRESS}/callbackBeforeInviteJoinGroupCommand?contenttype=json
3131
```
3232

33-
### 请求参数说明
34-
35-
| 参数 | 说明 |
36-
| --------------- | ------------------------------------------------- |
37-
| http | 请求协议为 HTTP,请求方式为 POST |
38-
| www.example.com | webhooks.yml 中的 url 字段,域名或主机名 |
39-
| CallbackCommand | 此处为:callbackBeforeInviteJoinGroupCommand` |
40-
| contenttype | 固定值为:JSON |
41-
42-
### Header
43-
| header名 | 示例值 | 选填 | 类型 | 说明 |
44-
|:------------|:--------------|:----|--------|---------------------|
45-
| operationID | 1646445464564 | 必填 | string | 用于全局链路追踪,建议使用时间戳,在每个请求中独立 |
46-
4733
### 请求包示例
4834

4935
```json
@@ -62,7 +48,7 @@ http://www.example.com/CallbackBeforeInviteMemberJoinGroupCommand?contenttype=js
6248
| 对象 | 类型 | 描述 |
6349
|-------------------------|--------|----------------------------------------------------------------|
6450
| callbackCommand | string | 回调命令,这里是邀请好友加入群组之前的回调。 |
65-
| operationID | string | 用于全局链路追踪,建议使用时间戳,在每个请求中独立 |
51+
| operationID | string | operationID用于全局链路追踪 |
6652
| groupID | string | 群组的唯一标识符。 |
6753
| reason | string | 邀请理由 |
6854
| invitedUserIDs | string[] | 加入群组的用户ID。 |

docs/restapi/webhooks/group/joinGroupAfter.mdx

Lines changed: 3 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -28,25 +28,11 @@ App 业务服务端可以通过该回调实时查看群成员加入的消息,
2828
## 接口说明
2929

3030
### 请求 URL 示例
31-
以下示例中 App 配置的回调 URL 为 `http://www.example.com/callbackCommand?contenttype=json`
31+
此处`CallbackCommand`为:`callbackAfterJoinGroupCommand`
3232
```plaintext
33-
http://www.example.com/CallbackAfterMemberJoinGroupCommand?contenttype=json
33+
http://{WEBHOOK_ADDRESS}/callbackAfterJoinGroupCommand?contenttype=json
3434
```
3535

36-
### 请求参数说明
37-
38-
| 参数 | 说明 |
39-
| --------------- | ------------------------------------------------- |
40-
| http | 请求协议为 HTTP,请求方式为 POST |
41-
| www.example.com | webhooks.yml 中的 url 字段,域名或主机名 |
42-
| CallbackCommand | 此处为:`callbackAfterJoinGroupCommand` |
43-
| contenttype | 固定值为:JSON |
44-
45-
### Header
46-
| header名 | 示例值 | 选填 | 类型 | 说明 |
47-
|:------------|:--------------|:----|--------|---------------------|
48-
| operationID | 1646445464564 | 必填 | string | 用于全局链路追踪,建议使用时间戳,在每个请求中独立 |
49-
5036
### 请求包示例
5137

5238
```json
@@ -67,7 +53,7 @@ http://www.example.com/CallbackAfterMemberJoinGroupCommand?contenttype=json
6753
| 对象 | 类型 | 描述 |
6854
|-------------------------|--------|----------------------------------------------------------------|
6955
| callbackCommand | string | 回调命令,这里是创建群组之前的回调。 |
70-
| operationID | string | 用于全局链路追踪,建议使用时间戳,在每个请求中独立 |
56+
| operationID | string | operationID用于全局链路追踪 |
7157
| userID | string | 加入群组的用户ID。 |
7258
| groupID | string | 群组的唯一标识符。 |
7359
| ex | string | 额外的数据字段。 |

0 commit comments

Comments
 (0)