Skip to content

Commit ae23062

Browse files
committed
Merge branch 'master' of https://github.com/eternnoir/pyTelegramBotAPI into refactoring
2 parents 27cc006 + fbaf88c commit ae23062

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ def readme():
77
return f.read()
88

99
setup(name='pyTelegramBotAPI',
10-
version='2.1.1',
10+
version='2.1.2',
1111
description='Python Telegram bot api. ',
1212
long_description=readme(),
1313
author='eternnoir',

telebot/types.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
import json
44
import six
55

6+
from telebot import util
7+
68

79
class JsonSerializable:
810
"""
@@ -553,7 +555,7 @@ def add(self, *args):
553555
i = 1
554556
row = []
555557
for button in args:
556-
if isinstance(button, str):
558+
if util.is_string(button):
557559
row.append({'text': button})
558560
else:
559561
row.append(button.to_dic())
@@ -574,7 +576,7 @@ def row(self, *args):
574576
"""
575577
btn_array = []
576578
for button in args:
577-
if isinstance(button, str):
579+
if util.is_string(button):
578580
btn_array.append({'text': button})
579581
else:
580582
btn_array.append(button.to_dic())
@@ -1194,8 +1196,8 @@ def __init__(self, id, title, latitude, longitude, address, foursquare_id=None,
11941196
self.thumb_height = thumb_height
11951197

11961198
def to_json(self):
1197-
json_dict = {'type': self.type, 'id': self.id, 'latitude': self.latitude, 'longitude': self.longitude,
1198-
'address': self.address}
1199+
json_dict = {'type': self.type, 'id': self.id, 'title': self.title, 'latitude': self.latitude,
1200+
'longitude': self.longitude, 'address': self.address}
11991201
if self.foursquare_id:
12001202
json_dict['foursquare_id'] = self.foursquare_id
12011203
if self.thumb_url:

0 commit comments

Comments
 (0)