wx2tg-puppet 1.1.1 → 1.1.3
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/dist/action/common.js +2 -1
- package/dist/core/EMOJI.d.ts +1 -0
- package/dist/core/EMOJI.js +1 -8
- package/dist/core/Message.js +1 -1
- package/dist/index.d.ts +1 -3
- package/dist/index.js +1 -3
- package/package.json +1 -1
package/dist/action/common.js
CHANGED
|
@@ -197,10 +197,11 @@ const say = (content, toWxid, ats) => __awaiter(void 0, void 0, void 0, function
|
|
|
197
197
|
const res = yield MsgApi_1.msgApi.SendEmoji({
|
|
198
198
|
"Md5": content.emojiMd5,
|
|
199
199
|
"TotalLen": content.emojiSize,
|
|
200
|
+
"Base64": content.emojiBase64,
|
|
200
201
|
"ToWxid": toWxid,
|
|
201
202
|
"Wxid": (config === null || config === void 0 ? void 0 : config.wxid) || ''
|
|
202
203
|
});
|
|
203
|
-
return new Message_1.ResponseMsg(res.data.Data.
|
|
204
|
+
return new Message_1.ResponseMsg(res.data.Data.emojiItem[0]);
|
|
204
205
|
}
|
|
205
206
|
else {
|
|
206
207
|
throw new Error('无法发送的消息类型');
|
package/dist/core/EMOJI.d.ts
CHANGED
package/dist/core/EMOJI.js
CHANGED
|
@@ -3,16 +3,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.Emoji = void 0;
|
|
4
4
|
class Emoji {
|
|
5
5
|
constructor(obj) {
|
|
6
|
-
// 对 emojiMd5 进行空值判断
|
|
7
|
-
if (!obj.emojiMd5) {
|
|
8
|
-
throw new Error('emojiMd5 字段不能为空');
|
|
9
|
-
}
|
|
10
|
-
// 对 emojiSize 进行空值判断
|
|
11
|
-
if (!obj.emojiSize) {
|
|
12
|
-
throw new Error('emojiSize 字段不能为空');
|
|
13
|
-
}
|
|
14
6
|
this.emojiMd5 = obj.emojiMd5;
|
|
15
7
|
this.emojiSize = obj.emojiSize;
|
|
8
|
+
this.emojiBase64 = obj.emojiBase64;
|
|
16
9
|
}
|
|
17
10
|
}
|
|
18
11
|
exports.Emoji = Emoji;
|
package/dist/core/Message.js
CHANGED
|
@@ -569,7 +569,7 @@ class ResponseMsg {
|
|
|
569
569
|
constructor(obj) {
|
|
570
570
|
var _a, _b;
|
|
571
571
|
this.newMsgId = (obj.NewMsgId || obj.newMsgId) + '';
|
|
572
|
-
this.msgId = (obj.ClientMsgid || obj.clientMsgId) + '';
|
|
572
|
+
this.msgId = (obj.ClientMsgid || obj.clientMsgId) ? (obj.ClientMsgid || obj.clientMsgId) + '' : '';
|
|
573
573
|
this.createTime = obj.Createtime || obj.createTime;
|
|
574
574
|
this.toWxid = ((_a = obj.ToUsetName) === null || _a === void 0 ? void 0 : _a.string) || ((_b = obj.ToUserName) === null || _b === void 0 ? void 0 : _b.string) || obj.toUserName;
|
|
575
575
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -23,9 +23,7 @@ export declare class WxBot extends EventEmitter {
|
|
|
23
23
|
private recentMsgIds;
|
|
24
24
|
constructor({ baseUrl, databasePath }: WxBotOptions);
|
|
25
25
|
qrcode(style?: number): Promise<{
|
|
26
|
-
|
|
27
|
-
qrCode: any;
|
|
28
|
-
};
|
|
26
|
+
qrCode: any;
|
|
29
27
|
}>;
|
|
30
28
|
private fetchAndShowQRCode;
|
|
31
29
|
private setupHeartbeat;
|
package/dist/index.js
CHANGED