@juzi/wechaty-puppet-whatsapp 1.0.11 → 1.0.12
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/dist/cjs/src/package-json.js +1 -1
- package/dist/cjs/src/whatsapp/event-handler/message-event-handler.js +1 -1
- package/dist/esm/src/package-json.js +1 -1
- package/dist/esm/src/whatsapp/event-handler/message-event-handler.js +1 -1
- package/package.json +1 -1
- package/src/package-json.ts +1 -1
- package/src/whatsapp/event-handler/message-event-handler.ts +1 -1
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.packageJson = void 0;
|
|
4
4
|
exports.packageJson = {
|
|
5
5
|
"name": "@juzi/wechaty-puppet-whatsapp",
|
|
6
|
-
"version": "1.0.
|
|
6
|
+
"version": "1.0.12",
|
|
7
7
|
"description": "Wechaty Puppet for WhatsApp",
|
|
8
8
|
"type": "module",
|
|
9
9
|
"exports": {
|
|
@@ -27,7 +27,7 @@ class MessageEventHandler extends whatsapp_base_js_1.default {
|
|
|
27
27
|
return;
|
|
28
28
|
}
|
|
29
29
|
await cacheManager.setMessageRawPayload(messageId, message);
|
|
30
|
-
if (message._data?.caption && message._data?.type
|
|
30
|
+
if (message._data?.caption && message._data?.type === 'image') { // see issue: https://github.com/wechaty/puppet-whatsapp/issues/390
|
|
31
31
|
// file message also have captions, but no text message should be generated
|
|
32
32
|
const genTextMessageFromImageMessage = message;
|
|
33
33
|
genTextMessageFromImageMessage.type = whatsapp_interface_js_1.MessageTypes.TEXT;
|
|
@@ -22,7 +22,7 @@ export default class MessageEventHandler extends WhatsAppBase {
|
|
|
22
22
|
return;
|
|
23
23
|
}
|
|
24
24
|
await cacheManager.setMessageRawPayload(messageId, message);
|
|
25
|
-
if (message._data?.caption && message._data?.type
|
|
25
|
+
if (message._data?.caption && message._data?.type === 'image') { // see issue: https://github.com/wechaty/puppet-whatsapp/issues/390
|
|
26
26
|
// file message also have captions, but no text message should be generated
|
|
27
27
|
const genTextMessageFromImageMessage = message;
|
|
28
28
|
genTextMessageFromImageMessage.type = WhatsAppMessageType.TEXT;
|
package/package.json
CHANGED
package/src/package-json.ts
CHANGED
|
@@ -44,7 +44,7 @@ export default class MessageEventHandler extends WhatsAppBase {
|
|
|
44
44
|
return
|
|
45
45
|
}
|
|
46
46
|
await cacheManager.setMessageRawPayload(messageId, message)
|
|
47
|
-
if ((message as WhatsAppMessagePayload)._data?.caption && (message as WhatsAppMessagePayload)._data?.type
|
|
47
|
+
if ((message as WhatsAppMessagePayload)._data?.caption && (message as WhatsAppMessagePayload)._data?.type === 'image') { // see issue: https://github.com/wechaty/puppet-whatsapp/issues/390
|
|
48
48
|
// file message also have captions, but no text message should be generated
|
|
49
49
|
const genTextMessageFromImageMessage = message as WhatsAppMessagePayload
|
|
50
50
|
genTextMessageFromImageMessage.type = WhatsAppMessageType.TEXT
|