mirror of
https://github.com/FranP-code/Baileys.git
synced 2025-10-13 00:32:22 +00:00
Explicit waitForConnection + option to not load profile picture for new chats
This commit is contained in:
@@ -85,6 +85,8 @@ export class WAConnection extends Base {
|
||||
}
|
||||
/** Prepare a media message for sending */
|
||||
async prepareMessageMedia(buffer: Buffer, mediaType: MessageType, options: MessageOptions = {}) {
|
||||
await this.waitForConnection ()
|
||||
|
||||
if (mediaType === MessageType.document && !options.mimetype) {
|
||||
throw new Error('mimetype required to send a document')
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user