lib/telegram/bot/updates_controller/reply_helpers.rb
# Edit message from callback query.
Edit message from callback query.
Edit message from callback query .
def edit_message(type, params = {})
          params =
            if message_id = payload['inline_message_id'] 
              params.merge(inline_message_id: message_id)
            elsif message = payload['message'] 
              params.merge(chat_id: message['chat']['id'], message_id: message['message_id'])
            else
              raise 'Can not edit message without `inline_message_id` or `message`'
            end
          bot.public_send("edit_message_#{type}", params)
        end
def edit_message ( type , params = { } ) params = if message_id = payload [ 'inline_message_id' ] params . merge ( inline_message_id : message_id ) elsif message = payload [ 'message' ] params . merge ( chat_id : message [ 'chat' ] [ 'id' ] , message_id : message [ 'message_id' ] ) else raise 'Can not edit message without `inline_message_id` or `message`' end bot . public_send ( "edit_message_#{type}" , params ) end
Edit message from callback query.
Edit message from callback query .
# rubocop:disable AssignmentInCondition # rubocop:disable AssignmentInCondition
type
params