wechaty-web-panel 1.2.3 → 1.2.5

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/CHANGELOG.md CHANGED
@@ -1,4 +1,8 @@
1
1
  ## 更新日志
2
+ ### V1.2.5(2022-11-30)
3
+
4
+ 1、修复回调事件带参
5
+
2
6
  ### V1.1.21(2022-10-31)
3
7
 
4
8
  1、添加群中关键词触发是否需要@功能
@@ -5,7 +5,11 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.getRoomRecordContent = exports.removeRecord = exports.getRoomRecord = exports.addRoomRecord = void 0;
7
7
  const nedb_js_1 = __importDefault(require("./nedb.js"));
8
- const rdb = (0, nedb_js_1.default)('./room.db');
8
+ const path_1 = __importDefault(require("path"));
9
+ const os_1 = __importDefault(require("os"));
10
+ const baseDir = path_1.default.join(os_1.default.homedir(), path_1.default.sep, ".wechaty", "wechaty-panel-cache", path_1.default.sep);
11
+ const dbpath = baseDir + 'room.db';
12
+ const rdb = (0, nedb_js_1.default)(dbpath);
9
13
  /**
10
14
  * 记录群聊天记录 记录格式
11
15
  * { roomName: '群名', roomId: '', content: '内容', contact: '用户名', wxid: '', time: '时间' }
@@ -6,7 +6,7 @@ exports.packageJson = void 0;
6
6
  */
7
7
  exports.packageJson = {
8
8
  "name": "wechaty-web-panel",
9
- "version": "1.2.3",
9
+ "version": "1.2.5",
10
10
  "description": "",
11
11
  "exports": {
12
12
  ".": {
@@ -166,7 +166,9 @@ async function callbackEvent({ that, msg, name, id, config, room, isMention }) {
166
166
  item.moreData &&
167
167
  item.moreData.length &&
168
168
  item.moreData.forEach((mItem) => {
169
- data[mItem.key] = data[mItem.value];
169
+ if (mItem.key !== 'uid' && mItem.key !== 'word') {
170
+ data[mItem.key] = mItem.value;
171
+ }
170
172
  });
171
173
  if (item.type === 100) {
172
174
  let res = await superagent_js_1.service.post(item.customUrl, data);
@@ -1,5 +1,9 @@
1
1
  import nedb from './nedb.js';
2
- const rdb = nedb('./room.db');
2
+ import path from "path";
3
+ import os from "os";
4
+ const baseDir = path.join(os.homedir(), path.sep, ".wechaty", "wechaty-panel-cache", path.sep);
5
+ const dbpath = baseDir + 'room.db';
6
+ const rdb = nedb(dbpath);
3
7
  /**
4
8
  * 记录群聊天记录 记录格式
5
9
  * { roomName: '群名', roomId: '', content: '内容', contact: '用户名', wxid: '', time: '时间' }
@@ -3,7 +3,7 @@
3
3
  */
4
4
  export const packageJson = {
5
5
  "name": "wechaty-web-panel",
6
- "version": "1.2.3",
6
+ "version": "1.2.5",
7
7
  "description": "",
8
8
  "exports": {
9
9
  ".": {
@@ -155,7 +155,9 @@ async function callbackEvent({ that, msg, name, id, config, room, isMention }) {
155
155
  item.moreData &&
156
156
  item.moreData.length &&
157
157
  item.moreData.forEach((mItem) => {
158
- data[mItem.key] = data[mItem.value];
158
+ if (mItem.key !== 'uid' && mItem.key !== 'word') {
159
+ data[mItem.key] = mItem.value;
160
+ }
159
161
  });
160
162
  if (item.type === 100) {
161
163
  let res = await service.post(item.customUrl, data);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wechaty-web-panel",
3
- "version": "1.2.3",
3
+ "version": "1.2.5",
4
4
  "description": "",
5
5
  "exports": {
6
6
  ".": {