@wppconnect-team/wppconnect 1.36.0 → 1.36.1
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,3 +1,7 @@
|
|
|
1
|
+
## <small>1.36.1 (2025-03-21)</small>
|
|
2
|
+
|
|
3
|
+
- chore: update workflow for launch release ([7dd3739](https://github.com/wppconnect-team/wppconnect/commit/7dd3739))
|
|
4
|
+
|
|
1
5
|
## 1.36.0 (2025-03-21)
|
|
2
6
|
|
|
3
7
|
- feat: Added client.onMessageEdit event (close #2092) ([874f8c4](https://github.com/wppconnect-team/wppconnect/commit/874f8c4)), closes [#2092](https://github.com/wppconnect-team/wppconnect/issues/2092)
|
|
@@ -82,7 +82,10 @@ export declare class SenderLayer extends ListenerLayer {
|
|
|
82
82
|
* @param quotedMessageId Quoted message id
|
|
83
83
|
* @param isViewOnce Enable single view
|
|
84
84
|
*/
|
|
85
|
-
sendImage(to: string, filePath: string, filename?: string, caption?: string, quotedMessageId?: string, isViewOnce?: boolean
|
|
85
|
+
sendImage(to: string, filePath: string, filename?: string, caption?: string, quotedMessageId?: string, isViewOnce?: boolean, options?: {
|
|
86
|
+
msgId?: string;
|
|
87
|
+
mentionedList?: string[];
|
|
88
|
+
}): Promise<{
|
|
86
89
|
ack: number;
|
|
87
90
|
id: string;
|
|
88
91
|
sendMsgResult: import("@wppconnect/wa-js/dist/whatsapp/enums").SendMsgResult;
|
|
@@ -103,7 +106,9 @@ export declare class SenderLayer extends ListenerLayer {
|
|
|
103
106
|
* await client.sendImageFromBase64("120[...]381@g.us'", "data:image/png;base64," + base64picture, "picture.png")
|
|
104
107
|
* ```
|
|
105
108
|
*/
|
|
106
|
-
sendImageFromBase64(to: string, base64: string, filename: string, caption?: string, quotedMessageId?: string, isViewOnce?: boolean, mentionedList?: any
|
|
109
|
+
sendImageFromBase64(to: string, base64: string, filename: string, caption?: string, quotedMessageId?: string, isViewOnce?: boolean, mentionedList?: any, options?: {
|
|
110
|
+
msgId?: string;
|
|
111
|
+
}): Promise<{
|
|
107
112
|
ack: number;
|
|
108
113
|
id: string;
|
|
109
114
|
sendMsgResult: import("@wppconnect/wa-js/dist/whatsapp/enums").SendMsgResult;
|
|
@@ -268,7 +268,7 @@ var SenderLayer = /** @class */ (function (_super) {
|
|
|
268
268
|
* @param quotedMessageId Quoted message id
|
|
269
269
|
* @param isViewOnce Enable single view
|
|
270
270
|
*/
|
|
271
|
-
SenderLayer.prototype.sendImage = function (to, filePath, filename, caption, quotedMessageId, isViewOnce) {
|
|
271
|
+
SenderLayer.prototype.sendImage = function (to, filePath, filename, caption, quotedMessageId, isViewOnce, options) {
|
|
272
272
|
return __awaiter(this, void 0, void 0, function () {
|
|
273
273
|
var base64, obj;
|
|
274
274
|
return __generator(this, function (_a) {
|
|
@@ -299,7 +299,7 @@ var SenderLayer = /** @class */ (function (_super) {
|
|
|
299
299
|
if (!filename) {
|
|
300
300
|
filename = path.basename(filePath);
|
|
301
301
|
}
|
|
302
|
-
return [4 /*yield*/, this.sendImageFromBase64(to, base64, filename, caption, quotedMessageId, isViewOnce)];
|
|
302
|
+
return [4 /*yield*/, this.sendImageFromBase64(to, base64, filename, caption, quotedMessageId, isViewOnce, options.mentionedList, options)];
|
|
303
303
|
case 4: return [2 /*return*/, _a.sent()];
|
|
304
304
|
}
|
|
305
305
|
});
|
|
@@ -321,7 +321,7 @@ var SenderLayer = /** @class */ (function (_super) {
|
|
|
321
321
|
* await client.sendImageFromBase64("120[...]381@g.us'", "data:image/png;base64," + base64picture, "picture.png")
|
|
322
322
|
* ```
|
|
323
323
|
*/
|
|
324
|
-
SenderLayer.prototype.sendImageFromBase64 = function (to, base64, filename, caption, quotedMessageId, isViewOnce, mentionedList) {
|
|
324
|
+
SenderLayer.prototype.sendImageFromBase64 = function (to, base64, filename, caption, quotedMessageId, isViewOnce, mentionedList, options) {
|
|
325
325
|
return __awaiter(this, void 0, void 0, function () {
|
|
326
326
|
var mimeType, obj, obj, result;
|
|
327
327
|
var _this = this;
|
|
@@ -355,6 +355,7 @@ var SenderLayer = /** @class */ (function (_super) {
|
|
|
355
355
|
case 0: return [4 /*yield*/, WPP.chat.sendFileMessage(to, base64, {
|
|
356
356
|
type: 'image',
|
|
357
357
|
isViewOnce: isViewOnce,
|
|
358
|
+
messageId: options === null || options === void 0 ? void 0 : options.msgId,
|
|
358
359
|
filename: filename,
|
|
359
360
|
caption: caption,
|
|
360
361
|
quotedMsg: quotedMessageId,
|
|
@@ -52,7 +52,10 @@ export declare class StatusLayer extends LabelsLayer {
|
|
|
52
52
|
* ```
|
|
53
53
|
* @param pathOrBase64 Path or base 64 image
|
|
54
54
|
*/
|
|
55
|
-
sendTextStatus(text: string, options:
|
|
55
|
+
sendTextStatus(text: string, options: {
|
|
56
|
+
backgroundColor?: string;
|
|
57
|
+
font?: number;
|
|
58
|
+
}): Promise<void>;
|
|
56
59
|
/**
|
|
57
60
|
* Mark status as read/seen
|
|
58
61
|
* @category Status
|
|
@@ -282,7 +282,9 @@ function onLoadingScreen(page, onLoadingScreenCallBack) {
|
|
|
282
282
|
var observer = new MutationObserver(function () {
|
|
283
283
|
var window2 = window;
|
|
284
284
|
var progressBar = window2.getElementByXpath(selectors.PROGRESS);
|
|
285
|
+
var progressBarNewTheme = window2.getElementByXpath(selectors.PROGRESS_NEW_THEME);
|
|
285
286
|
var progressMessage = window2.getElementByXpath(selectors.PROGRESS_MESSAGE);
|
|
287
|
+
var progressMessageNewTheme = window2.getElementByXpath(selectors.PROGRESS_MESSAGE_NEW_THEME);
|
|
286
288
|
if (progressBar) {
|
|
287
289
|
if (this.lastPercent !== progressBar.value ||
|
|
288
290
|
this.lastPercentMessage !== progressMessage.innerText) {
|
|
@@ -291,6 +293,17 @@ function onLoadingScreen(page, onLoadingScreenCallBack) {
|
|
|
291
293
|
this.lastPercentMessage = progressMessage.innerText;
|
|
292
294
|
}
|
|
293
295
|
}
|
|
296
|
+
else if (progressBarNewTheme) {
|
|
297
|
+
if (this.lastPercent !== progressBarNewTheme.value ||
|
|
298
|
+
this.lastPercentMessage !== progressMessageNewTheme.innerText) {
|
|
299
|
+
var progressMsg = progressMessageNewTheme.innerText != 'WhatsApp'
|
|
300
|
+
? progressMessageNewTheme.innerText
|
|
301
|
+
: '';
|
|
302
|
+
window2.loadingScreen(progressBarNewTheme.value, progressMsg);
|
|
303
|
+
this.lastPercent = progressBarNewTheme.value;
|
|
304
|
+
this.lastPercentMessage = progressMsg;
|
|
305
|
+
}
|
|
306
|
+
}
|
|
294
307
|
});
|
|
295
308
|
observer.observe(document, {
|
|
296
309
|
attributes: true,
|
|
@@ -300,7 +313,9 @@ function onLoadingScreen(page, onLoadingScreenCallBack) {
|
|
|
300
313
|
});
|
|
301
314
|
}, {
|
|
302
315
|
PROGRESS: "//*[@id='app']/div/div/div[2]/progress",
|
|
316
|
+
PROGRESS_NEW_THEME: "//*[@id='app']/div/div/div[3]/progress",
|
|
303
317
|
PROGRESS_MESSAGE: "//*[@id='app']/div/div/div[3]",
|
|
318
|
+
PROGRESS_MESSAGE_NEW_THEME: "//*[@id='app']/div/div/div[2]",
|
|
304
319
|
})];
|
|
305
320
|
case 3:
|
|
306
321
|
_a.sent();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wppconnect-team/wppconnect",
|
|
3
|
-
"version": "1.36.
|
|
3
|
+
"version": "1.36.1",
|
|
4
4
|
"description": "WPPConnect is an open source project developed by the JavaScript community with the aim of exporting functions from WhatsApp Web to the node, which can be used to support the creation of any interaction, such as customer service, media sending, intelligence recognition based on phrases artificial and many other things, use your imagination... 😀🤔💭",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -94,9 +94,9 @@
|
|
|
94
94
|
},
|
|
95
95
|
"dependencies": {
|
|
96
96
|
"@wppconnect/wa-js": "^3.16.6",
|
|
97
|
-
"@wppconnect/wa-version": "^1.5.
|
|
97
|
+
"@wppconnect/wa-version": "^1.5.1217",
|
|
98
98
|
"atob": "^2.1.2",
|
|
99
|
-
"axios": "^1.8.
|
|
99
|
+
"axios": "^1.8.4",
|
|
100
100
|
"boxen": "^5.1.2",
|
|
101
101
|
"catch-exit": "^1.2.2",
|
|
102
102
|
"chalk": "~4.1.2",
|
package/test.mp4
ADDED
|
Binary file
|