feat: Send and receive location
This commit is contained in:
parent
4b1768450f
commit
7b229a39a4
1 changed files with 66 additions and 3 deletions
|
|
@ -13,6 +13,7 @@ const ContactFactory = require('./factories/ContactFactory');
|
|||
const ClientInfo = require('./structures/ClientInfo');
|
||||
const Message = require('./structures/Message');
|
||||
const MessageMedia = require('./structures/MessageMedia');
|
||||
const Location = require('./structures/Location');
|
||||
|
||||
/**
|
||||
* Starting point for interacting with the WhatsApp Web API
|
||||
|
|
@ -255,6 +256,9 @@ class Client extends EventEmitter {
|
|||
} else if(options.media instanceof MessageMedia) {
|
||||
internalOptions.media = options.media;
|
||||
internalOptions.caption = content;
|
||||
} else if(content instanceof Location) {
|
||||
internalOptions.location = content;
|
||||
content = '';
|
||||
}
|
||||
|
||||
const newMessage = await this.pupPage.evaluate(async (chatId, message, options) => {
|
||||
|
|
|
|||
Loading…
Reference in a new issue