mirror of
https://github.com/eternnoir/pyTelegramBotAPI.git
synced 2023-08-10 21:12:57 +03:00
Add user to MessageEntity.
This commit is contained in:
parent
f9c7497c5c
commit
8c20f63022
@ -311,13 +311,17 @@ class MessageEntity(JsonDeserializable):
|
|||||||
offset = obj['offset']
|
offset = obj['offset']
|
||||||
length = obj['length']
|
length = obj['length']
|
||||||
url = obj.get('url')
|
url = obj.get('url')
|
||||||
return cls(type, offset, length, url)
|
user = None
|
||||||
|
if 'user' in obj:
|
||||||
|
user = User.de_json(obj['user'])
|
||||||
|
return cls(type, offset, length, url, user)
|
||||||
|
|
||||||
def __init__(self, type, offset, length, url=None):
|
def __init__(self, type, offset, length, url=None, user=None):
|
||||||
self.type = type
|
self.type = type
|
||||||
self.offset = offset
|
self.offset = offset
|
||||||
self.length = length
|
self.length = length
|
||||||
self.url = url
|
self.url = url
|
||||||
|
self.user = user
|
||||||
|
|
||||||
|
|
||||||
class PhotoSize(JsonDeserializable):
|
class PhotoSize(JsonDeserializable):
|
||||||
|
Loading…
Reference in New Issue
Block a user