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.
@@ -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.List[0]);
204
+ return new Message_1.ResponseMsg(res.data.Data.emojiItem[0]);
204
205
  }
205
206
  else {
206
207
  throw new Error('无法发送的消息类型');
@@ -1,5 +1,6 @@
1
1
  export declare class Emoji {
2
2
  emojiMd5: any;
3
3
  emojiSize: any;
4
+ emojiBase64: any;
4
5
  constructor(obj: any);
5
6
  }
@@ -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;
@@ -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
- qr: {
27
- qrCode: any;
28
- };
26
+ qrCode: any;
29
27
  }>;
30
28
  private fetchAndShowQRCode;
31
29
  private setupHeartbeat;
package/dist/index.js CHANGED
@@ -59,9 +59,7 @@ class WxBot extends events_1.EventEmitter {
59
59
  "Wxid": config === null || config === void 0 ? void 0 : config.wxid
60
60
  });
61
61
  return {
62
- qr: {
63
- qrCode: res.data.Data.qrcode.buffer
64
- }
62
+ qrCode: res.data.Data.qrcode.buffer
65
63
  };
66
64
  });
67
65
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wx2tg-puppet",
3
- "version": "1.1.1",
3
+ "version": "1.1.3",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "files": [