From e976b521288036457af1a445e3e2c9530b6c2bff Mon Sep 17 00:00:00 2001 From: Ilias Ismanalijev Date: Thu, 9 Jul 2015 13:36:53 +0200 Subject: [PATCH] sendlocation with options --- src/telegram.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/telegram.js b/src/telegram.js index 2aab978..c1872b6 100644 --- a/src/telegram.js +++ b/src/telegram.js @@ -383,15 +383,15 @@ TelegramBot.prototype.sendChatAction = function (chatId, action) { * @param {Number|String} chatId Unique identifier for the message recipient * @param {Float} latitude Latitude of location * @param {Float} longitude Longitude of location + * @param {Object} [options] Additional Telegram query options * @return {Promise} * @see https://core.telegram.org/bots/api#sendlocation */ -TelegramBot.prototype.sendLocation = function (chatId, latitude, longitude) { - var query = { - chat_id: chatId, - latitude: latitude, - longitude: longitude - }; +TelegramBot.prototype.sendLocation = function (chatId, latitude, longitude, options) { + var query = options || {}; + query.chat_id = chatId; + query.latitude = latitude; + query.longitude = longitude; return this._request('sendLocation', {qs: query}); };