alemonjs 2.1.0-alpha.0 → 2.1.0-alpha.1
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/app/hook-use-api.js +3 -1
- package/lib/cbp/connect.js +0 -1
- package/lib/cbp/index.js +4 -4
- package/lib/typing/event/base/user.d.ts +1 -17
- package/package.json +1 -1
package/lib/app/hook-use-api.js
CHANGED
|
@@ -140,7 +140,9 @@ const useMessage = (event) => {
|
|
|
140
140
|
*/
|
|
141
141
|
const send = async (val) => {
|
|
142
142
|
if (!val || val.length === 0) {
|
|
143
|
-
return [
|
|
143
|
+
return [
|
|
144
|
+
createResult(ResultCode.FailParams, 'Invalid val: val must be a non-empty array', null)
|
|
145
|
+
];
|
|
144
146
|
}
|
|
145
147
|
const result = await sendAction({
|
|
146
148
|
action: 'message.send',
|
package/lib/cbp/connect.js
CHANGED
package/lib/cbp/index.js
CHANGED
|
@@ -278,16 +278,16 @@ const cbpServer = (port, listeningListener) => {
|
|
|
278
278
|
value: getConfig().value,
|
|
279
279
|
args: getConfig().argv,
|
|
280
280
|
package: {
|
|
281
|
-
version: getConfig().package?.version
|
|
281
|
+
version: getConfig().package?.version
|
|
282
282
|
},
|
|
283
283
|
env: {
|
|
284
284
|
login: process.env.login,
|
|
285
285
|
platform: process.env.platform,
|
|
286
|
-
port: process.env.port
|
|
287
|
-
}
|
|
286
|
+
port: process.env.port
|
|
287
|
+
}
|
|
288
288
|
},
|
|
289
289
|
// 主动消息
|
|
290
|
-
activeId: originId
|
|
290
|
+
activeId: originId
|
|
291
291
|
}));
|
|
292
292
|
const isFullReceive = headers[FULL_RECEIVE_HEADER] === '1';
|
|
293
293
|
// 如果是全量接收
|
|
@@ -16,23 +16,7 @@ type User = {
|
|
|
16
16
|
/**
|
|
17
17
|
* 用户头像地址
|
|
18
18
|
*/
|
|
19
|
-
UserAvatar?:
|
|
20
|
-
/**
|
|
21
|
-
* 头像地址
|
|
22
|
-
* @returns
|
|
23
|
-
*/
|
|
24
|
-
toURL: () => Promise<string>;
|
|
25
|
-
/**
|
|
26
|
-
* 头像base64
|
|
27
|
-
* @returns
|
|
28
|
-
*/
|
|
29
|
-
toBase64: () => Promise<string>;
|
|
30
|
-
/**
|
|
31
|
-
* 头像Buffer
|
|
32
|
-
* @returns
|
|
33
|
-
*/
|
|
34
|
-
toBuffer: () => Promise<Buffer>;
|
|
35
|
-
};
|
|
19
|
+
UserAvatar?: string;
|
|
36
20
|
/**
|
|
37
21
|
* 是否是主人
|
|
38
22
|
*/
|