wx2tg-puppet 1.1.4 → 1.1.6

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.
@@ -0,0 +1,10 @@
1
+ declare class QWContactApi {
2
+ /** QWApplyAddContact */
3
+ QWApplyAddContact(body: any): Axios.IPromise<Axios.AxiosXHR<unknown>>;
4
+ /** QWAddContact */
5
+ QWAddContact(body: any): Axios.IPromise<Axios.AxiosXHR<unknown>>;
6
+ /** SearchQWContact */
7
+ SearchQWContact(body: any): Axios.IPromise<Axios.AxiosXHR<unknown>>;
8
+ }
9
+ export declare const qwContactApi: QWContactApi;
10
+ export {};
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.qwContactApi = void 0;
4
+ const axiosInstance_1 = require("../utils/axiosInstance");
5
+ class QWContactApi {
6
+ /** QWApplyAddContact */
7
+ QWApplyAddContact(body) {
8
+ return axiosInstance_1.axiosInstance.post('/QWContact/QWApplyAddContact', body);
9
+ }
10
+ /** QWAddContact */
11
+ QWAddContact(body) {
12
+ return axiosInstance_1.axiosInstance.post('/QWContact/QWContact/QWAddContact', body);
13
+ }
14
+ /** SearchQWContact */
15
+ SearchQWContact(body) {
16
+ return axiosInstance_1.axiosInstance.post('/QWContact/SearchQWContact', body);
17
+ }
18
+ }
19
+ exports.qwContactApi = new QWContactApi();
package/dist/index.js CHANGED
@@ -255,7 +255,7 @@ class WxBot extends events_1.EventEmitter {
255
255
  MsgSource: msg.MsgSource,
256
256
  NewMsgId: msg.NewMsgId,
257
257
  MsgSeq: msg.MsgSeq,
258
- RoomId: msg.FromUserName.string.endsWith('@chatroom') ? msg.FromUserName.string : '',
258
+ RoomId: (msg.FromUserName.string.endsWith('@chatroom') ? msg.FromUserName.string : '') || (msg.ToUserName.string.endsWith('@chatroom') ? msg.ToUserName.string : ''),
259
259
  IsSelf: msg.FromUserName.string === userName,
260
260
  xml: msg.Content.string
261
261
  });
@@ -265,7 +265,7 @@ class WxBot extends events_1.EventEmitter {
265
265
  if (!contactE) {
266
266
  contactE = new ContactEntity_1.ContactEntity();
267
267
  }
268
- contactE.nickName = message._pushContent.split(':')[0].slice(0, -1);
268
+ contactE.nickName = msg.PushContent.split(':')[0].slice(0, -1);
269
269
  contactE.userName = message.fromId;
270
270
  contactE.smallHeadImgUrl = 'https://raw.githubusercontent.com/finalpi/wechat2tg/wx2tg-pad/qywx.jpg';
271
271
  contactE.bigHeadImgUrl = 'https://raw.githubusercontent.com/finalpi/wechat2tg/wx2tg-pad/qywx.jpg';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wx2tg-puppet",
3
- "version": "1.1.4",
3
+ "version": "1.1.6",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "files": [