wechaty-web-panel 1.6.24 → 1.6.25
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,34 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
2
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
4
|
};
|
|
28
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
6
|
exports.dispatchAsync = void 0;
|
|
30
7
|
const mustache_1 = __importDefault(require("mustache"));
|
|
31
|
-
const PUPPET = __importStar(require("wechaty-puppet"));
|
|
32
8
|
function roomTalker(options) {
|
|
33
9
|
if (!options) {
|
|
34
10
|
return () => undefined;
|
|
@@ -238,7 +214,30 @@ const unidirectionalMapper = async (message, one) => {
|
|
|
238
214
|
* then we add a sender information for the destination rooms.
|
|
239
215
|
*/
|
|
240
216
|
if (topic === one) {
|
|
241
|
-
const
|
|
217
|
+
const typeMap = {
|
|
218
|
+
0: 'Unknown',
|
|
219
|
+
1: 'Attachment',
|
|
220
|
+
2: 'Audio',
|
|
221
|
+
3: 'Contact',
|
|
222
|
+
4: 'ChatHistory',
|
|
223
|
+
5: 'Emoticon',
|
|
224
|
+
6: 'Image',
|
|
225
|
+
7: 'Text',
|
|
226
|
+
8: 'Location',
|
|
227
|
+
9: 'MiniProgram',
|
|
228
|
+
10: 'GroupNote',
|
|
229
|
+
11: 'Transfer',
|
|
230
|
+
12: 'RedEnvelope',
|
|
231
|
+
13: 'Recalled',
|
|
232
|
+
14: 'Url',
|
|
233
|
+
15: 'Video',
|
|
234
|
+
16: 'Post',
|
|
235
|
+
17: 'Channel',
|
|
236
|
+
18: 'System',
|
|
237
|
+
19: 'Markdown',
|
|
238
|
+
20: 'CallRecord', // Call Record (voice and video, maybe group?)
|
|
239
|
+
};
|
|
240
|
+
const type = typeMap[message.type()];
|
|
242
241
|
messageList.unshift(`${prefix}: ${type}`);
|
|
243
242
|
}
|
|
244
243
|
break;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import Mustache from 'mustache';
|
|
2
|
-
import * as PUPPET from 'wechaty-puppet';
|
|
3
2
|
function roomTalker(options) {
|
|
4
3
|
if (!options) {
|
|
5
4
|
return () => undefined;
|
|
@@ -209,7 +208,30 @@ const unidirectionalMapper = async (message, one) => {
|
|
|
209
208
|
* then we add a sender information for the destination rooms.
|
|
210
209
|
*/
|
|
211
210
|
if (topic === one) {
|
|
212
|
-
const
|
|
211
|
+
const typeMap = {
|
|
212
|
+
0: 'Unknown',
|
|
213
|
+
1: 'Attachment',
|
|
214
|
+
2: 'Audio',
|
|
215
|
+
3: 'Contact',
|
|
216
|
+
4: 'ChatHistory',
|
|
217
|
+
5: 'Emoticon',
|
|
218
|
+
6: 'Image',
|
|
219
|
+
7: 'Text',
|
|
220
|
+
8: 'Location',
|
|
221
|
+
9: 'MiniProgram',
|
|
222
|
+
10: 'GroupNote',
|
|
223
|
+
11: 'Transfer',
|
|
224
|
+
12: 'RedEnvelope',
|
|
225
|
+
13: 'Recalled',
|
|
226
|
+
14: 'Url',
|
|
227
|
+
15: 'Video',
|
|
228
|
+
16: 'Post',
|
|
229
|
+
17: 'Channel',
|
|
230
|
+
18: 'System',
|
|
231
|
+
19: 'Markdown',
|
|
232
|
+
20: 'CallRecord', // Call Record (voice and video, maybe group?)
|
|
233
|
+
};
|
|
234
|
+
const type = typeMap[message.type()];
|
|
213
235
|
messageList.unshift(`${prefix}: ${type}`);
|
|
214
236
|
}
|
|
215
237
|
break;
|