mirror of
https://github.com/cheveguerra/whatsapp-web.js.git
synced 2026-04-18 03:29:14 +00:00
feat: Send and receive location
This commit is contained in:
@@ -2,6 +2,8 @@
|
||||
|
||||
const Base = require('./Base');
|
||||
const MessageMedia = require('./MessageMedia');
|
||||
const Location = require('./Location');
|
||||
const { MessageTypes } = require('../util/Constants');
|
||||
|
||||
/**
|
||||
* Represents a Message on WhatsApp
|
||||
@@ -90,6 +92,12 @@ class Message extends Base {
|
||||
*/
|
||||
this.hasQuotedMsg = data.quotedMsg ? true : false;
|
||||
|
||||
/**
|
||||
* Location information contained in the message, if the message is type "location"
|
||||
* @type {Location}
|
||||
*/
|
||||
this.location = data.type === MessageTypes.LOCATION ? new Location(data.lat, data.lng, data.loc) : undefined;
|
||||
|
||||
/**
|
||||
* Indicates the mentions in the message body.
|
||||
* @type {Array<string>}
|
||||
|
||||
Reference in New Issue
Block a user