feat: event message_ciphertext (#2292)

* add option cipherMsg

* add event  message_ciphertext

* example

* remove option cipherMsg

* removing unlinked code

* Update Client.js

---------

Co-authored-by: Shir Serlui <70711723+shirser121@users.noreply.github.com>
Co-authored-by: alechkos <93551621+alechkos@users.noreply.github.com>
This commit is contained in:
tofers 2023-12-16 19:10:26 +03:00 • committed by GitHub
commit 1dd35be834
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 28 additions and 0 deletions

7
index.d.ts vendored
View file

@ -304,6 +304,12 @@ declare namespace WAWebJS {
/** The message that was created */
message: Message
) => void): this
/** Emitted when a new message ciphertext is received */
on(event: 'message_ciphertext', listener: (
/** The message that was ciphertext */
message: Message
) => void): this
/** Emitted when a message is deleted for everyone in the chat */
on(event: 'message_revoke_everyone', listener: (
@ -647,6 +653,7 @@ declare namespace WAWebJS {
AUTHENTICATION_FAILURE = 'auth_failure',
READY = 'ready',
MESSAGE_RECEIVED = 'message',
MESSAGE_CIPHERTEXT = 'message_ciphertext',
MESSAGE_CREATE = 'message_create',
MESSAGE_REVOKED_EVERYONE = 'message_revoke_everyone',
MESSAGE_REVOKED_ME = 'message_revoke_me',