From 4746011dd1907be6a759c59d5b914cc3c49d19b5 Mon Sep 17 00:00:00 2001 From: Chris54721 Date: Thu, 15 Sep 2016 17:58:40 +0200 Subject: [PATCH] Add edited_message support --- src/telegram.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/telegram.js b/src/telegram.js index 7359306..6513dc7 100644 --- a/src/telegram.js +++ b/src/telegram.js @@ -82,6 +82,7 @@ class TelegramBot extends EventEmitter { processUpdate(update) { debug('Process Update %j', update); const message = update.message; + const editedMessage = update.edited_message; const inlineQuery = update.inline_query; const chosenInlineResult = update.chosen_inline_result; const callbackQuery = update.callback_query; @@ -120,6 +121,9 @@ class TelegramBot extends EventEmitter { } }); } + } else if (editedMessage) { + debug('Process Update edited_message %j', editedMessage); + this.emit('edited_message', editedMessage); } else if (inlineQuery) { debug('Process Update inline_query %j', inlineQuery); this.emit('inline_query', inlineQuery);