fix: Message.getInfo (#2574)

* module fixed + improved modules retrieving

* wait for msg data to be updated

* added random sleep value between 1100-1200 ms

* added check for msg is sent by current user

* node 13 compatible

* docs fixed

* msg.fromMe fixed

* timestamp calculation fixed

* window.injectToFunction clarifications
This commit is contained in:
alechkos 2023-11-24 12:18:18 +02:00 • committed by GitHub
commit 7ff9c9807b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 25 additions and 20 deletions

6
index.d.ts vendored
View file

@ -981,7 +981,7 @@ declare namespace WAWebJS {
* The custom message secret, can be used as a poll ID
* @note It has to be a unique vector with a length of 32
*/
messageSecret: ?Array<number>
messageSecret: Array<number>|undefined
}
/** Represents a Poll on WhatsApp */
@ -1341,7 +1341,7 @@ declare namespace WAWebJS {
code: number;
message: string;
isInviteV4Sent: boolean,
};
}
};
/** An object that handles options for adding participants */
@ -1410,7 +1410,7 @@ declare namespace WAWebJS {
/** Group participants */
participants: Array<GroupParticipant>;
/** Adds a list of participants by ID to the group */
addParticipants: (participantIds: string|string[], options?: AddParticipantsOptions) => Promise<Object.<string, AddParticipantsResult>|string>;
addParticipants: (participantIds: string | string[], options?: AddParticipantsOptions) => Promise<{ [key: string]: AddParticipantsResult } | string>;
/** Removes a list of participants by ID to the group */
removeParticipants: (participantIds: string[]) => Promise<{ status: number }>;
/** Promotes participants by IDs to admins */