From 006838887275ba0c7968a1b4b180cd57e1c26106 Mon Sep 17 00:00:00 2001 From: pieter Date: Wed, 1 Jul 2015 18:56:21 +0200 Subject: [PATCH] Implemented #17 (with some small adjustments) and ForceReply Changed apihelper#convert_markup Constructed the Jsonable abstract class. All subclasses must override Jsonable#to_json. Made ReplyKeyboardHide, ReplyKeyboardMarkup and ForceReply a subclass of Jsonable to make things less complicated in convert_markup. --- telebot/apihelper.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/telebot/apihelper.py b/telebot/apihelper.py index 10e88f9..ab59b2a 100644 --- a/telebot/apihelper.py +++ b/telebot/apihelper.py @@ -147,7 +147,7 @@ def check_result(func_name, result): def convert_markup(markup): - if not isinstance(markup, types.Jsonable): + if isinstance(markup, types.Jsonable): return markup.to_json() return markup