Added option for forcing message id

This commit is contained in:
Dmitry Sadovsky
2020-12-28 13:41:27 +03:00
parent 5fb9e8abed
commit 165451d752
2 changed files with 4 additions and 2 deletions

View File

@@ -260,7 +260,7 @@ export class WAConnection extends Base {
key: { key: {
remoteJid: id, remoteJid: id,
fromMe: true, fromMe: true,
id: generateMessageID(), id: options?.messageId || generateMessageID(),
}, },
message: message, message: message,
messageTimestamp: timestamp, messageTimestamp: timestamp,

View File

@@ -377,6 +377,8 @@ export interface MessageOptions {
/** Should it send as a disappearing messages. /** Should it send as a disappearing messages.
* By default 'chat' -- which follows the setting of the chat */ * By default 'chat' -- which follows the setting of the chat */
sendEphemeral?: 'chat' | boolean sendEphemeral?: 'chat' | boolean
/** Force message id */
messageId?: string
} }
export interface WABroadcastListInfo { export interface WABroadcastListInfo {
status: number status: number