@wppconnect/wa-js 2.4.0 → 2.4.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,12 @@
|
|
|
1
|
+
## 2.4.1 (2022-05-31)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* Fixed detect mentionedList for invalid wids ([#427](https://github.com/wppconnect-team/wa-js/issues/427)) ([c701dc3](https://github.com/wppconnect-team/wa-js/commit/c701dc3b8b04cce1e51dd5dda12bf5e80e11de2e))
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
1
10
|
# 2.4.0 (2022-05-28)
|
|
2
11
|
|
|
3
12
|
|
|
@@ -20,10 +20,23 @@ export interface DeleteMessageReturn {
|
|
|
20
20
|
sendMsgResult: Promise<SendMsgResult>;
|
|
21
21
|
isRevoked: boolean;
|
|
22
22
|
isDeleted: boolean;
|
|
23
|
+
isSentByMe: boolean;
|
|
23
24
|
}
|
|
24
25
|
/**
|
|
25
26
|
* Delete a message
|
|
26
27
|
*
|
|
28
|
+
* @example
|
|
29
|
+
* ```javascript
|
|
30
|
+
* // Delete a message
|
|
31
|
+
* WPP.chat.deleteMessage('[number]@callback.us', 'msgid');
|
|
32
|
+
* // Delete a list of messages
|
|
33
|
+
* WPP.chat.deleteMessage('[number]@callback.us', ['msgid1', 'msgid2]);
|
|
34
|
+
* // Delete a message and delete media
|
|
35
|
+
* WPP.chat.deleteMessage('[number]@callback.us', 'msgid', true);
|
|
36
|
+
* // Revoke a message
|
|
37
|
+
* WPP.chat.deleteMessage('[number]@callback.us', 'msgid', true, true);
|
|
38
|
+
* ```
|
|
39
|
+
*
|
|
27
40
|
* @category Message
|
|
28
41
|
*/
|
|
29
42
|
export declare function deleteMessage(chatId: string | Wid, id: string, deleteMediaInDevice: boolean, revoke: boolean): Promise<DeleteMessageReturn>;
|
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
import { ChatModel } from '..';
|
|
17
|
+
import { MsgModel } from '../models';
|
|
17
18
|
import { EventEmitter } from '.';
|
|
18
19
|
/** @whatsapp 88102
|
|
19
20
|
* @whatsapp 81572 >= 2.2218.4
|
|
@@ -49,8 +50,11 @@ export declare class CmdClass extends EventEmitter {
|
|
|
49
50
|
ephemeralDrawer(e?: any, t?: any): void;
|
|
50
51
|
sendStarMsgs(e?: any, t?: any, r?: any, n?: any): void;
|
|
51
52
|
sendUnstarMsgs(e?: any, t?: any, r?: any, n?: any): void;
|
|
52
|
-
sendDeleteMsgs(
|
|
53
|
-
sendRevokeMsgs(
|
|
53
|
+
sendDeleteMsgs(chat: ChatModel, msgs: MsgModel[], clearMedia?: boolean, toastPosition?: any): void;
|
|
54
|
+
sendRevokeMsgs(chat: ChatModel, msgs: MsgModel[], options?: {
|
|
55
|
+
clearMedia?: boolean;
|
|
56
|
+
toastPosition?: any;
|
|
57
|
+
}): void;
|
|
54
58
|
_openChat(e?: any, t?: any): void;
|
|
55
59
|
openChatAt(chat: ChatModel, context: ReturnType<ChatModel['getSearchContext']>): Promise<boolean>;
|
|
56
60
|
openChatFromUnread(chat: ChatModel): Promise<boolean>;
|