node-karin 0.12.13 → 0.12.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/adapter/input/index.d.ts +1 -1
- package/lib/adapter/input/index.js +1 -1
- package/lib/adapter/onebot/11/event.js +90 -84
- package/lib/adapter/onebot/11/index.d.ts +89 -127
- package/lib/adapter/onebot/11/index.js +192 -254
- package/lib/cli/index.js +2 -2
- package/lib/core/init/config.js +1 -1
- package/lib/core/karin/karin.d.ts +21 -30
- package/lib/core/karin/karin.js +7 -9
- package/lib/core/listener/listener.js +11 -11
- package/lib/core/plugin/base.d.ts +7 -21
- package/lib/core/plugin/base.js +2 -6
- package/lib/core/plugin/loader.d.ts +5 -15
- package/lib/core/plugin/loader.js +5 -15
- package/lib/core/server/server.js +4 -4
- package/lib/event/handler/base.d.ts +1 -3
- package/lib/event/handler/base.js +1 -3
- package/lib/event/handler/message.js +9 -3
- package/lib/event/handler/notice.js +38 -32
- package/lib/event/handler/request.js +6 -6
- package/lib/index.d.ts +6 -0
- package/lib/index.js +6 -0
- package/lib/modules.d.ts +2 -2
- package/lib/modules.js +3 -2
- package/lib/types/adapter/accept.d.ts +24 -0
- package/lib/types/adapter/accept.js +1 -0
- package/lib/types/adapter/api.d.ts +88 -264
- package/lib/types/adapter/base.d.ts +3 -3
- package/lib/types/config/config.d.ts +4 -12
- package/lib/types/element/element.d.ts +119 -349
- package/lib/types/element/qqbot.d.ts +4 -12
- package/lib/types/event/contact.d.ts +6 -12
- package/lib/types/event/event.d.ts +59 -163
- package/lib/types/event/message.d.ts +11 -31
- package/lib/types/event/message.js +10 -12
- package/lib/types/event/notice.d.ts +118 -325
- package/lib/types/event/notice.js +8 -10
- package/lib/types/event/request.d.ts +29 -66
- package/lib/types/event/request.js +8 -10
- package/lib/types/event/sender.d.ts +7 -21
- package/lib/types/index.d.ts +1 -0
- package/lib/types/index.js +1 -0
- package/lib/types/onebot11/api.d.ts +49 -49
- package/lib/types/onebot11/event.d.ts +131 -347
- package/lib/types/onebot11/params.d.ts +184 -456
- package/lib/types/onebot11/response.d.ts +159 -381
- package/lib/types/onebot11/segment.d.ts +25 -75
- package/lib/types/onebot11/sender.d.ts +13 -39
- package/lib/types/plugin/app.d.ts +7 -11
- package/lib/types/plugin/plugin.d.ts +55 -165
- package/lib/types/render/render.d.ts +16 -48
- package/lib/utils/common/common.js +4 -2
- package/lib/utils/config/config.js +1 -1
- package/lib/utils/core/logger.js +3 -3
- package/lib/utils/core/segment.d.ts +28 -59
- package/lib/utils/core/segment.js +26 -30
- package/lib/utils/tools/restart.d.ts +3 -3
- package/lib/utils/tools/restart.js +5 -5
- package/package.json +1 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* 事件来源枚举
|
|
3
3
|
*/
|
|
4
4
|
export declare const enum Scene {
|
|
5
5
|
/** 群 */
|
|
@@ -9,7 +9,7 @@ export declare const enum Scene {
|
|
|
9
9
|
/** 频道 */
|
|
10
10
|
Guild = "guild",
|
|
11
11
|
/** 频道私信 */
|
|
12
|
-
|
|
12
|
+
GuildDirect = "guild_direct",
|
|
13
13
|
/** 临时会话 */
|
|
14
14
|
Nearby = "nearby",
|
|
15
15
|
/** 陌生人 */
|
|
@@ -18,19 +18,13 @@ export declare const enum Scene {
|
|
|
18
18
|
StrangerFromGroup = "stranger_from_group"
|
|
19
19
|
}
|
|
20
20
|
/**
|
|
21
|
-
*
|
|
21
|
+
* 事件联系人信息 也就是从哪来的这条消息
|
|
22
22
|
*/
|
|
23
23
|
export interface Contact {
|
|
24
|
-
/**
|
|
25
|
-
* - 事件来源场景
|
|
26
|
-
*/
|
|
24
|
+
/** 事件来源场景 */
|
|
27
25
|
scene: `${Scene}`;
|
|
28
|
-
/**
|
|
29
|
-
* - 事件来源id 群号或者用户id
|
|
30
|
-
*/
|
|
26
|
+
/** 事件来源id 群号或者用户id */
|
|
31
27
|
peer: string;
|
|
32
|
-
/**
|
|
33
|
-
* - 事件来源子id 仅在频道和临时会话中存在
|
|
34
|
-
*/
|
|
28
|
+
/** 事件来源子id 仅在频道和临时会话中存在 */
|
|
35
29
|
sub_peer?: string;
|
|
36
30
|
}
|
|
@@ -6,133 +6,81 @@ import { Reply, replyCallback } from './reply.js';
|
|
|
6
6
|
* 事件类型枚举
|
|
7
7
|
*/
|
|
8
8
|
export declare const enum EventType {
|
|
9
|
-
/**
|
|
10
|
-
* - 消息事件
|
|
11
|
-
*/
|
|
9
|
+
/** 消息事件 */
|
|
12
10
|
Message = "message",
|
|
13
|
-
/**
|
|
14
|
-
* - 通知事件
|
|
15
|
-
*/
|
|
11
|
+
/** 通知事件 */
|
|
16
12
|
Notice = "notice",
|
|
17
|
-
/**
|
|
18
|
-
* - 请求事件
|
|
19
|
-
*/
|
|
13
|
+
/** 请求事件 */
|
|
20
14
|
Request = "request"
|
|
21
15
|
}
|
|
22
16
|
/**
|
|
23
17
|
* 消息事件子类型枚举
|
|
24
18
|
*/
|
|
25
19
|
export declare const enum MessageSubType {
|
|
26
|
-
/**
|
|
27
|
-
* - 群消息
|
|
28
|
-
*/
|
|
20
|
+
/** 群消息 */
|
|
29
21
|
GroupMessage = "group_message",
|
|
30
|
-
/**
|
|
31
|
-
* - 私聊消息
|
|
32
|
-
*/
|
|
22
|
+
/** 私聊消息 */
|
|
33
23
|
PrivateMessage = "private_message",
|
|
34
|
-
/**
|
|
35
|
-
* - 频道消息
|
|
36
|
-
*/
|
|
24
|
+
/** 频道消息 */
|
|
37
25
|
GuildMessage = "guild_message",
|
|
38
|
-
/**
|
|
39
|
-
|
|
40
|
-
|
|
26
|
+
/** 频道私信 */
|
|
27
|
+
GuildPrivateMessage = "guild_direct",
|
|
28
|
+
/** 附近消息 */
|
|
41
29
|
Nearby = "nearby",
|
|
42
|
-
/**
|
|
43
|
-
* - 陌生人消息
|
|
44
|
-
*/
|
|
30
|
+
/** 陌生人消息 */
|
|
45
31
|
Stranger = "stranger"
|
|
46
32
|
}
|
|
47
33
|
/**
|
|
48
34
|
* 通知事件子类型枚举
|
|
49
35
|
*/
|
|
50
36
|
export declare const enum NoticeSubType {
|
|
51
|
-
/**
|
|
52
|
-
* - 私聊戳一戳
|
|
53
|
-
*/
|
|
37
|
+
/** 私聊戳一戳 */
|
|
54
38
|
PrivatePoke = "private_poke",
|
|
55
|
-
/**
|
|
56
|
-
* - 私聊撤回消息
|
|
57
|
-
*/
|
|
39
|
+
/** 私聊撤回消息 */
|
|
58
40
|
PrivateRecall = "private_recall",
|
|
59
|
-
/**
|
|
60
|
-
* - 私聊发送文件
|
|
61
|
-
*/
|
|
41
|
+
/** 私聊发送文件 */
|
|
62
42
|
PrivateFileUploaded = "private_file_uploaded",
|
|
63
|
-
/**
|
|
64
|
-
* - 群聊戳一戳
|
|
65
|
-
*/
|
|
43
|
+
/** 群聊戳一戳 */
|
|
66
44
|
GroupPoke = "group_poke",
|
|
67
|
-
/**
|
|
68
|
-
* - 群聊名片变动
|
|
69
|
-
*/
|
|
45
|
+
/** 群聊名片变动 */
|
|
70
46
|
GroupCardChanged = "group_card_changed",
|
|
71
|
-
/**
|
|
72
|
-
* - 群聊成员头衔变动
|
|
73
|
-
*/
|
|
47
|
+
/** 群聊成员头衔变动 */
|
|
74
48
|
GroupMemberUniqueTitleChanged = "group_member_unique_title_changed",
|
|
75
|
-
/**
|
|
76
|
-
* - 群聊精华消息变动
|
|
77
|
-
*/
|
|
49
|
+
/** 群聊精华消息变动 */
|
|
78
50
|
GroupEssenceChanged = "group_essence_changed",
|
|
79
|
-
/**
|
|
80
|
-
* - 群聊撤回消息
|
|
81
|
-
*/
|
|
51
|
+
/** 群聊撤回消息 */
|
|
82
52
|
GroupRecall = "group_recall",
|
|
83
|
-
/**
|
|
84
|
-
* - 群聊成员增加
|
|
85
|
-
*/
|
|
53
|
+
/** 群聊成员增加 */
|
|
86
54
|
GroupMemberIncrease = "group_member_increase",
|
|
87
|
-
/**
|
|
88
|
-
* - 群聊成员减少
|
|
89
|
-
*/
|
|
55
|
+
/** 群聊成员减少 */
|
|
90
56
|
GroupMemberDecrease = "group_member_decrease",
|
|
91
|
-
/**
|
|
92
|
-
* - 群聊管理员变动
|
|
93
|
-
*/
|
|
57
|
+
/** 群聊管理员变动 */
|
|
94
58
|
GroupAdminChanged = "group_admin_changed",
|
|
95
|
-
/**
|
|
96
|
-
* - 群聊成员禁言
|
|
97
|
-
*/
|
|
59
|
+
/** 群聊成员禁言 */
|
|
98
60
|
GroupMemberBan = "group_member_ban",
|
|
99
|
-
/**
|
|
100
|
-
* - 群聊签到
|
|
101
|
-
*/
|
|
61
|
+
/** 群聊签到 */
|
|
102
62
|
GroupSignIn = "group_sign_in",
|
|
103
|
-
/**
|
|
104
|
-
* - 群聊全员禁言
|
|
105
|
-
*/
|
|
63
|
+
/** 群聊全员禁言 */
|
|
106
64
|
GroupWholeBan = "group_whole_ban",
|
|
107
|
-
/**
|
|
108
|
-
* - 群聊发送文件
|
|
109
|
-
*/
|
|
65
|
+
/** 群聊发送文件 */
|
|
110
66
|
GroupFileUploaded = "group_file_uploaded",
|
|
111
|
-
/**
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
67
|
+
/** 群聊消息表情动态回应 */
|
|
68
|
+
GroupMessageReaction = "group_message_reaction",
|
|
69
|
+
/** 好友增加 */
|
|
70
|
+
FriendIncrease = "friend_increase"
|
|
115
71
|
}
|
|
116
72
|
/**
|
|
117
73
|
* 请求事件子类型枚举
|
|
118
74
|
*/
|
|
119
75
|
export declare const enum RequestSubType {
|
|
120
|
-
/**
|
|
121
|
-
* - 好友申请
|
|
122
|
-
*/
|
|
76
|
+
/** 好友申请 */
|
|
123
77
|
PrivateApply = "private_apply",
|
|
124
|
-
/**
|
|
125
|
-
* - 群聊申请
|
|
126
|
-
*/
|
|
78
|
+
/** 群聊申请 */
|
|
127
79
|
GroupApply = "group_apply",
|
|
128
|
-
/**
|
|
129
|
-
* - 邀请入群
|
|
130
|
-
*/
|
|
80
|
+
/** 邀请入群 */
|
|
131
81
|
InvitedGroup = "invited_group"
|
|
132
82
|
}
|
|
133
|
-
/**
|
|
134
|
-
* - 类型映射
|
|
135
|
-
*/
|
|
83
|
+
/** 类型映射 */
|
|
136
84
|
export type EventToSubEvent = {
|
|
137
85
|
[EventType.Message]: MessageSubType;
|
|
138
86
|
[EventType.Notice]: NoticeSubType;
|
|
@@ -162,42 +110,26 @@ export type AllListenEvent = `${EventType}` | `${CombinedEventType}`;
|
|
|
162
110
|
* 事件基类定义
|
|
163
111
|
*/
|
|
164
112
|
export interface KarinEventType {
|
|
165
|
-
/**
|
|
166
|
-
* - 机器人ID 请尽量使用UID
|
|
167
|
-
*/
|
|
113
|
+
/** 机器人ID 请尽量使用UID */
|
|
168
114
|
self_id: string;
|
|
169
|
-
/**
|
|
170
|
-
* - 用户ID
|
|
171
|
-
*/
|
|
115
|
+
/** 用户ID */
|
|
172
116
|
user_id: string;
|
|
173
117
|
/**
|
|
174
118
|
* - 群ID 仅在群聊中存在
|
|
175
119
|
* @default ''
|
|
176
120
|
*/
|
|
177
121
|
group_id: string;
|
|
178
|
-
/**
|
|
179
|
-
* - 事件类型
|
|
180
|
-
*/
|
|
122
|
+
/** 事件类型 */
|
|
181
123
|
event: EventType;
|
|
182
|
-
/**
|
|
183
|
-
* - 事件子类型
|
|
184
|
-
*/
|
|
124
|
+
/** 事件子类型 */
|
|
185
125
|
sub_event: EventToSubEvent[EventType];
|
|
186
|
-
/**
|
|
187
|
-
* - 事件ID
|
|
188
|
-
*/
|
|
126
|
+
/** 事件ID */
|
|
189
127
|
event_id: string;
|
|
190
|
-
/**
|
|
191
|
-
* - 事件触发时间戳
|
|
192
|
-
*/
|
|
128
|
+
/** 事件触发时间戳 */
|
|
193
129
|
time: number;
|
|
194
|
-
/**
|
|
195
|
-
* - 事件联系人信息
|
|
196
|
-
*/
|
|
130
|
+
/** 事件联系人信息 */
|
|
197
131
|
contact: Contact;
|
|
198
|
-
/**
|
|
199
|
-
* - 事件发送者信息
|
|
200
|
-
*/
|
|
132
|
+
/** 事件发送者信息 */
|
|
201
133
|
sender: Sender;
|
|
202
134
|
/**
|
|
203
135
|
* - 是否为主人
|
|
@@ -229,77 +161,41 @@ export interface KarinEventType {
|
|
|
229
161
|
* @default false
|
|
230
162
|
*/
|
|
231
163
|
isGroupTemp: boolean;
|
|
232
|
-
/**
|
|
233
|
-
* - 日志函数字符串
|
|
234
|
-
*/
|
|
164
|
+
/** 日志函数字符串 */
|
|
235
165
|
logFnc: string;
|
|
236
|
-
/**
|
|
237
|
-
* - 日志用户字符串
|
|
238
|
-
*/
|
|
166
|
+
/** 日志用户字符串 */
|
|
239
167
|
logText: string;
|
|
240
|
-
/**
|
|
241
|
-
* - 存储器 由开发者自行调用
|
|
242
|
-
*/
|
|
168
|
+
/** 存储器 由开发者自行调用 */
|
|
243
169
|
store: Map<any, any>;
|
|
244
|
-
/**
|
|
245
|
-
* - 原始消息
|
|
246
|
-
*/
|
|
170
|
+
/** 原始消息 */
|
|
247
171
|
raw_message: string;
|
|
248
|
-
/**
|
|
249
|
-
* - 原始事件字段
|
|
250
|
-
*/
|
|
172
|
+
/** 原始事件字段 */
|
|
251
173
|
raw_event: any;
|
|
252
|
-
/**
|
|
253
|
-
* - 回复函数
|
|
254
|
-
*/
|
|
174
|
+
/** 回复函数 */
|
|
255
175
|
reply: Reply;
|
|
256
|
-
/**
|
|
257
|
-
* - 回复函数 由适配器实现,开发者不应该直接调用
|
|
258
|
-
*/
|
|
176
|
+
/** 回复函数 由适配器实现,开发者不应该直接调用 */
|
|
259
177
|
replyCallback: replyCallback;
|
|
260
|
-
/**
|
|
261
|
-
* - bot实例
|
|
262
|
-
*/
|
|
178
|
+
/** bot实例 */
|
|
263
179
|
bot: KarinAdapter;
|
|
264
180
|
}
|
|
265
|
-
/**
|
|
266
|
-
* - 基本事件参数
|
|
267
|
-
*/
|
|
181
|
+
/** 基本事件参数 */
|
|
268
182
|
export interface BaseEventDataType {
|
|
269
|
-
/**
|
|
270
|
-
* - 机器人ID 请尽量使用UID
|
|
271
|
-
*/
|
|
183
|
+
/** 机器人ID */
|
|
272
184
|
self_id: KarinEventType['self_id'];
|
|
273
|
-
/**
|
|
274
|
-
* - 用户ID
|
|
275
|
-
*/
|
|
185
|
+
/** 用户ID */
|
|
276
186
|
user_id: KarinEventType['user_id'];
|
|
277
|
-
/**
|
|
278
|
-
* - 群ID 仅在群聊中需要提供
|
|
279
|
-
*/
|
|
187
|
+
/** 群ID 仅在群聊中需要提供 */
|
|
280
188
|
group_id?: KarinEventType['group_id'];
|
|
281
|
-
/**
|
|
282
|
-
* - 事件触发时间戳
|
|
283
|
-
*/
|
|
189
|
+
/** 事件触发时间戳 */
|
|
284
190
|
time: KarinEventType['time'];
|
|
285
|
-
/**
|
|
286
|
-
* - 事件联系人信息
|
|
287
|
-
*/
|
|
191
|
+
/** 事件联系人信息 */
|
|
288
192
|
contact: KarinEventType['contact'];
|
|
289
|
-
/**
|
|
290
|
-
* - 事件发送者信息
|
|
291
|
-
*/
|
|
193
|
+
/** 事件发送者信息 */
|
|
292
194
|
sender: KarinEventType['sender'];
|
|
293
|
-
/**
|
|
294
|
-
* - 事件子类型
|
|
295
|
-
*/
|
|
195
|
+
/** 事件子类型 */
|
|
296
196
|
sub_event: KarinEventType['sub_event'];
|
|
297
|
-
/**
|
|
298
|
-
* - 事件ID
|
|
299
|
-
*/
|
|
197
|
+
/** 事件ID */
|
|
300
198
|
event_id: KarinEventType['event_id'];
|
|
301
|
-
/**
|
|
302
|
-
* - 原始事件字段
|
|
303
|
-
*/
|
|
199
|
+
/** 原始事件字段 */
|
|
304
200
|
raw_event: KarinEventType['raw_event'];
|
|
305
201
|
}
|
|
@@ -1,42 +1,26 @@
|
|
|
1
1
|
import { KarinElement } from '../element/element.js';
|
|
2
2
|
import { KarinEventType, BaseEventDataType, EventType, MessageSubType } from './event.js';
|
|
3
|
-
/**
|
|
4
|
-
* - 消息事件定义
|
|
5
|
-
*/
|
|
3
|
+
/** 消息事件定义 */
|
|
6
4
|
export interface KarinMessageType extends KarinEventType {
|
|
7
5
|
event: EventType.Message;
|
|
8
6
|
sub_event: MessageSubType;
|
|
9
|
-
/**
|
|
10
|
-
* - 消息ID
|
|
11
|
-
*/
|
|
7
|
+
/** 消息ID */
|
|
12
8
|
message_id: string;
|
|
13
|
-
/**
|
|
14
|
-
* - 消息序列号
|
|
15
|
-
*/
|
|
9
|
+
/** 消息序列号 */
|
|
16
10
|
message_seq?: number;
|
|
17
|
-
/**
|
|
18
|
-
* - 原始消息文本
|
|
19
|
-
*/
|
|
11
|
+
/** 原始消息文本 */
|
|
20
12
|
raw_message: string;
|
|
21
|
-
/**
|
|
22
|
-
* - 消息体元素
|
|
23
|
-
*/
|
|
13
|
+
/** 消息体元素 */
|
|
24
14
|
elements: Array<KarinElement>;
|
|
25
|
-
/**
|
|
26
|
-
* - 群ID
|
|
27
|
-
*/
|
|
15
|
+
/** 群ID */
|
|
28
16
|
group_id: string;
|
|
29
17
|
/**
|
|
30
18
|
* 经过处理后的消息
|
|
31
19
|
*/
|
|
32
20
|
msg: string;
|
|
33
|
-
/**
|
|
34
|
-
* - 消息图片
|
|
35
|
-
*/
|
|
21
|
+
/** 消息图片 */
|
|
36
22
|
image: string[];
|
|
37
|
-
/**
|
|
38
|
-
* - 语音url
|
|
39
|
-
*/
|
|
23
|
+
/** 语音url */
|
|
40
24
|
record: string;
|
|
41
25
|
file: any;
|
|
42
26
|
/**
|
|
@@ -55,14 +39,10 @@ export interface KarinMessageType extends KarinEventType {
|
|
|
55
39
|
* 引用回复的消息id
|
|
56
40
|
*/
|
|
57
41
|
reply_id: string;
|
|
58
|
-
/**
|
|
59
|
-
* - bot别名
|
|
60
|
-
*/
|
|
42
|
+
/** bot别名 */
|
|
61
43
|
alias: string;
|
|
62
44
|
}
|
|
63
|
-
/**
|
|
64
|
-
* - 创建一个消息事件
|
|
65
|
-
*/
|
|
45
|
+
/** 创建一个消息事件 */
|
|
66
46
|
export declare class KarinMessage implements KarinMessageType {
|
|
67
47
|
self_id: KarinMessageType['self_id'];
|
|
68
48
|
user_id: KarinMessageType['user_id'];
|
|
@@ -99,7 +79,7 @@ export declare class KarinMessage implements KarinMessageType {
|
|
|
99
79
|
at: KarinMessageType['at'];
|
|
100
80
|
reply_id: KarinMessageType['reply_id'];
|
|
101
81
|
alias: KarinMessageType['alias'];
|
|
102
|
-
constructor({ event, self_id, user_id, group_id, time, contact, sender, sub_event, event_id, message_id, message_seq, elements, raw_event, }: BaseEventDataType & {
|
|
82
|
+
constructor({ event, self_id: selfId, user_id: userId, group_id: groupId, time, contact, sender, sub_event: subEvent, event_id: eventId, message_id: messageId, message_seq: messageSeq, elements, raw_event: rawEvent, }: BaseEventDataType & {
|
|
103
83
|
event: KarinMessageType['event'];
|
|
104
84
|
sub_event: KarinMessageType['sub_event'];
|
|
105
85
|
message_id: KarinMessageType['message_id'];
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* - 创建一个消息事件
|
|
3
|
-
*/
|
|
1
|
+
/** 创建一个消息事件 */
|
|
4
2
|
export class KarinMessage {
|
|
5
3
|
self_id;
|
|
6
4
|
user_id;
|
|
@@ -37,20 +35,20 @@ export class KarinMessage {
|
|
|
37
35
|
at;
|
|
38
36
|
reply_id;
|
|
39
37
|
alias;
|
|
40
|
-
constructor({ event, self_id, user_id, group_id = '', time, contact, sender, sub_event, event_id, message_id, message_seq, elements, raw_event, }) {
|
|
41
|
-
this.self_id =
|
|
42
|
-
this.user_id =
|
|
38
|
+
constructor({ event, self_id: selfId, user_id: userId, group_id: groupId = '', time, contact, sender, sub_event: subEvent, event_id: eventId, message_id: messageId, message_seq: messageSeq, elements, raw_event: rawEvent, }) {
|
|
39
|
+
this.self_id = selfId;
|
|
40
|
+
this.user_id = userId;
|
|
43
41
|
this.time = time;
|
|
44
42
|
this.event = event;
|
|
45
|
-
this.event_id =
|
|
43
|
+
this.event_id = eventId;
|
|
46
44
|
this.contact = contact;
|
|
47
45
|
this.sender = sender;
|
|
48
|
-
this.sub_event =
|
|
49
|
-
this.message_id =
|
|
50
|
-
this.message_seq =
|
|
46
|
+
this.sub_event = subEvent;
|
|
47
|
+
this.message_id = messageId;
|
|
48
|
+
this.message_seq = messageSeq;
|
|
51
49
|
this.elements = elements;
|
|
52
|
-
this.group_id = contact.scene === 'group' ? (contact.peer ||
|
|
53
|
-
this.raw_event =
|
|
50
|
+
this.group_id = contact.scene === 'group' ? (contact.peer || groupId) : groupId;
|
|
51
|
+
this.raw_event = rawEvent;
|
|
54
52
|
this.isMaster = false;
|
|
55
53
|
this.isAdmin = false;
|
|
56
54
|
this.isPrivate = false;
|