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 +4 -0
- package/dist/cjs/src/db/roomDb.js +5 -1
- package/dist/cjs/src/package-json.js +1 -1
- package/dist/cjs/src/service/msg-filters.js +3 -1
- package/dist/esm/src/db/roomDb.js +5 -1
- package/dist/esm/src/package-json.js +1 -1
- package/dist/esm/src/service/msg-filters.js +3 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -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
|
|
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: '时间' }
|
|
@@ -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
|
-
|
|
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
|
-
|
|
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: '时间' }
|
|
@@ -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
|
-
|
|
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);
|