2
0
mirror of https://github.com/yagop/node-telegram-bot-api synced 2025-08-29 13:27:44 +00:00

Add edited_message support

This commit is contained in:
Chris54721 2016-09-15 17:58:40 +02:00 committed by GitHub
parent e0e5e9a7b0
commit 4746011dd1

View File

@ -82,6 +82,7 @@ class TelegramBot extends EventEmitter {
processUpdate(update) { processUpdate(update) {
debug('Process Update %j', update); debug('Process Update %j', update);
const message = update.message; const message = update.message;
const editedMessage = update.edited_message;
const inlineQuery = update.inline_query; const inlineQuery = update.inline_query;
const chosenInlineResult = update.chosen_inline_result; const chosenInlineResult = update.chosen_inline_result;
const callbackQuery = update.callback_query; 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) { } else if (inlineQuery) {
debug('Process Update inline_query %j', inlineQuery); debug('Process Update inline_query %j', inlineQuery);
this.emit('inline_query', inlineQuery); this.emit('inline_query', inlineQuery);