mirror of
https://github.com/python-telegram-bot/python-telegram-bot.git
synced 2026-06-22 09:05:21 +00:00
Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 32dc05ed36 | |||
| ba5902c1d4 | |||
| 80371c9f6e | |||
| a8fd6b5061 |
@@ -1,3 +1,10 @@
|
||||
2015-08-17
|
||||
Release 2.7
|
||||
Added support for Voice object and sendVoice method
|
||||
Due backward compatibility performer or/and title will be required for sendAudio
|
||||
Fixed JSON serialization when forwared message
|
||||
|
||||
|
||||
2015-08-15
|
||||
Released 2.6.1
|
||||
Fixed parsing image header issue on < Python 2.7.3
|
||||
|
||||
@@ -15,7 +15,7 @@ def read(*paths):
|
||||
|
||||
setup(
|
||||
name='python-telegram-bot',
|
||||
version='2.6.1',
|
||||
version='2.7',
|
||||
author='Leandro Toledo',
|
||||
author_email='leandrotoledodesouza@gmail.com',
|
||||
license='LGPLv3',
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
|
||||
__author__ = 'leandrotoledodesouza@gmail.com'
|
||||
__version__ = '2.6.1'
|
||||
__version__ = '2.7'
|
||||
|
||||
from .base import TelegramObject
|
||||
from .user import User
|
||||
|
||||
+13
-5
@@ -174,6 +174,13 @@ class Message(TelegramObject):
|
||||
else:
|
||||
left_chat_participant = None
|
||||
|
||||
if 'new_chat_photo' in data:
|
||||
from telegram import PhotoSize
|
||||
new_chat_photo = \
|
||||
[PhotoSize.de_json(x) for x in data['new_chat_photo']]
|
||||
else:
|
||||
new_chat_photo = None
|
||||
|
||||
return Message(message_id=data.get('message_id', None),
|
||||
from_user=from_user,
|
||||
date=date,
|
||||
@@ -194,7 +201,7 @@ class Message(TelegramObject):
|
||||
new_chat_participant=new_chat_participant,
|
||||
left_chat_participant=left_chat_participant,
|
||||
new_chat_title=data.get('new_chat_title', None),
|
||||
new_chat_photo=data.get('new_chat_photo', None),
|
||||
new_chat_photo=new_chat_photo,
|
||||
delete_chat_photo=data.get('delete_chat_photo', None),
|
||||
group_chat_created=data.get('group_chat_created', None))
|
||||
|
||||
@@ -218,7 +225,7 @@ class Message(TelegramObject):
|
||||
if self.forward_from:
|
||||
data['forward_from'] = self.forward_from.to_dict()
|
||||
if self.reply_to_message:
|
||||
data['reply_to_message'] = self.reply_to_message
|
||||
data['reply_to_message'] = self.reply_to_message.to_dict()
|
||||
if self.text:
|
||||
data['text'] = self.text
|
||||
if self.audio:
|
||||
@@ -240,13 +247,14 @@ class Message(TelegramObject):
|
||||
if self.location:
|
||||
data['location'] = self.location.to_dict()
|
||||
if self.new_chat_participant:
|
||||
data['new_chat_participant'] = self.new_chat_participant
|
||||
data['new_chat_participant'] = self.new_chat_participant.to_dict()
|
||||
if self.left_chat_participant:
|
||||
data['left_chat_participant'] = self.left_chat_participant
|
||||
data['left_chat_participant'] = \
|
||||
self.left_chat_participant.to_dict()
|
||||
if self.new_chat_title:
|
||||
data['new_chat_title'] = self.new_chat_title
|
||||
if self.new_chat_photo:
|
||||
data['new_chat_photo'] = self.new_chat_photo
|
||||
data['new_chat_photo'] = [p.to_dict() for p in self.new_chat_photo]
|
||||
if self.delete_chat_photo:
|
||||
data['delete_chat_photo'] = self.delete_chat_photo
|
||||
if self.group_chat_created:
|
||||
|
||||
Reference in New Issue
Block a user