whatsapp-web.js 1.15.1 → 1.15.2

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/README.md CHANGED
@@ -1,4 +1,4 @@
1
- [![npm](https://img.shields.io/npm/v/whatsapp-web.js.svg)](https://www.npmjs.com/package/whatsapp-web.js) [![Depfu](https://badges.depfu.com/badges/4a65a0de96ece65fdf39e294e0c8dcba/overview.svg)](https://depfu.com/github/pedroslopez/whatsapp-web.js?project_id=9765) ![WhatsApp_Web 2.2142.12](https://img.shields.io/badge/WhatsApp_Web-2.2142.12-brightgreen.svg) [![Discord Chat](https://img.shields.io/discord/698610475432411196.svg?logo=discord)](https://discord.gg/H7DqQs4)
1
+ [![npm](https://img.shields.io/npm/v/whatsapp-web.js.svg)](https://www.npmjs.com/package/whatsapp-web.js) [![Depfu](https://badges.depfu.com/badges/4a65a0de96ece65fdf39e294e0c8dcba/overview.svg)](https://depfu.com/github/pedroslopez/whatsapp-web.js?project_id=9765) ![WhatsApp_Web 2.2146.9](https://img.shields.io/badge/WhatsApp_Web-2.2146.9-brightgreen.svg) [![Discord Chat](https://img.shields.io/discord/698610475432411196.svg?logo=discord)](https://discord.gg/H7DqQs4)
2
2
 
3
3
  # whatsapp-web.js
4
4
  A WhatsApp API client that connects through the WhatsApp Web browser app
@@ -7,6 +7,13 @@ It uses Puppeteer to run a real instance of Whatsapp Web to avoid getting blocke
7
7
 
8
8
  **NOTE:** I can't guarantee you will not be blocked by using this method, although it has worked for me. WhatsApp does not allow bots or unofficial clients on their platform, so this shouldn't be considered totally safe.
9
9
 
10
+ ## Quick Links
11
+
12
+ * [Guide / Getting Started](https://wwebjs.dev/guide) _(work in progress)_
13
+ * [Reference documentation](https://docs.wwebjs.dev/)
14
+ * [GitHub](https://github.com/pedroslopez/whatsapp-web.js)
15
+ * [npm](https://npmjs.org/package/whatsapp-web.js)
16
+
10
17
  ## Installation
11
18
 
12
19
  The module is now available on npm! `npm i whatsapp-web.js`
@@ -80,7 +87,7 @@ After that check the following webpage and check http://127.0.0.1:9220/json and
80
87
  | Send messages | ✅ |
81
88
  | Receive messages | ✅ |
82
89
  | Send media (images/audio/documents) | ✅ |
83
- | Send media (video) | ✅ [(requires google chrome)](https://guide.wwebjs.dev/features/handling-attachments#caveat-for-sending-videos-and-gifs) |
90
+ | Send media (video) | ✅ [(requires google chrome)](https://wwebjs.dev/guide/handling-attachments.html#caveat-for-sending-videos-and-gifs) |
84
91
  | Send stickers | ✅ |
85
92
  | Receive media (images/audio/video/documents) | ✅ |
86
93
  | Send contact cards | ✅ |
@@ -105,13 +112,6 @@ After that check the following webpage and check http://127.0.0.1:9220/json and
105
112
 
106
113
  Something missing? Make an issue and let us know!
107
114
 
108
- ## Links
109
-
110
- * [Reference](https://docs.wwebjs.dev/)
111
- * [Guide](https://guide.wwebjs.dev/) _(work in progress)_
112
- * [GitHub](https://github.com/pedroslopez/whatsapp-web.js)
113
- * [npm](https://npmjs.org/package/whatsapp-web.js)
114
-
115
115
  ## Contributing
116
116
 
117
117
  Pull requests are welcome! If you see something you'd like to add, please do. For drastic changes, please open an issue first.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "whatsapp-web.js",
3
- "version": "1.15.1",
3
+ "version": "1.15.2",
4
4
  "description": "Library for interacting with the WhatsApp Web API ",
5
5
  "main": "./index.js",
6
6
  "typings": "./index.d.ts",
@@ -26,7 +26,7 @@
26
26
  "bugs": {
27
27
  "url": "https://github.com/pedroslopez/whatsapp-web.js/issues"
28
28
  },
29
- "homepage": "https://guide.wwebjs.dev/",
29
+ "homepage": "https://wwebjs.dev/",
30
30
  "dependencies": {
31
31
  "@pedroslopez/moduleraid": "^5.0.2",
32
32
  "fluent-ffmpeg": "^2.1.2",
@@ -59,7 +59,7 @@ class Buttons {
59
59
  _format(buttons){
60
60
  buttons = buttons.slice(0,3); // phone users can only see 3 buttons, so lets limit this
61
61
  return buttons.map((btn) => {
62
- return {'buttonId':btn.id ? btn.id : Util.generateHash(6),'buttonText':{'displayText':btn.body},'type':1};
62
+ return {'buttonId':btn.id ? String(btn.id) : Util.generateHash(6),'buttonText':{'displayText':btn.body},'type':1};
63
63
  });
64
64
  }
65
65
 
@@ -5,15 +5,15 @@ exports.ExposeStore = (moduleRaidStr) => {
5
5
  eval('var moduleRaid = ' + moduleRaidStr);
6
6
  // eslint-disable-next-line no-undef
7
7
  window.mR = moduleRaid();
8
- window.Store = window.mR.findModule('Chat')[0].default;
9
- window.Store.AppState = window.mR.findModule('STREAM')[0].default;
10
- window.Store.Conn = window.mR.findModule('Conn')[0].default;
8
+ window.Store = Object.assign({}, window.mR.findModule('Chat')[0].default);
9
+ window.Store.AppState = window.mR.findModule('STREAM')[0].Socket;
10
+ window.Store.Conn = window.mR.findModule('Conn')[0].Conn;
11
11
  window.Store.CryptoLib = window.mR.findModule('decryptE2EMedia')[0];
12
12
  window.Store.Wap = window.mR.findModule('Wap')[0].default;
13
13
  window.Store.SendSeen = window.mR.findModule('sendSeen')[0];
14
14
  window.Store.SendClear = window.mR.findModule('sendClear')[0];
15
15
  window.Store.SendDelete = window.mR.findModule('sendDelete')[0];
16
- window.Store.genId = window.mR.findModule('randomId')[0].default;
16
+ window.Store.genId = window.mR.findModule('randomId')[0].randomId;
17
17
  window.Store.SendMessage = window.mR.findModule('addAndSendMsgToChat')[0];
18
18
  window.Store.MsgKey = window.mR.findModule((module) => module.default && module.default.fromString)[0].default;
19
19
  window.Store.Invite = window.mR.findModule('sendJoinGroupViaInvite')[0];
@@ -36,8 +36,8 @@ exports.ExposeStore = (moduleRaidStr) => {
36
36
  window.Store.Features = window.mR.findModule('FEATURE_CHANGE_EVENT')[0].default;
37
37
  window.Store.QueryOrder = window.mR.findModule('queryOrder')[0];
38
38
  window.Store.QueryProduct = window.mR.findModule('queryProduct')[0];
39
- window.Store.DownloadManager = window.mR.findModule('DownloadManager')[0].default;
40
- window.Store.Call = window.mR.findModule('CallCollection')[0].default;
39
+ window.Store.DownloadManager = window.mR.findModule('downloadManager')[0].downloadManager;
40
+ window.Store.Call = window.mR.findModule('CallCollection')[0].CallCollection;
41
41
 
42
42
  if(!window.Store.Chat._find) {
43
43
  window.Store.Chat._find = e => {