mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-08-05 03:22:29 +00:00
Create a convenient class to wrap Dialog instances
This commit is contained in:
@@ -35,12 +35,12 @@ def get_display_name(entity):
|
||||
elif entity.last_name:
|
||||
return entity.last_name
|
||||
else:
|
||||
return '(No name)'
|
||||
return ''
|
||||
|
||||
if isinstance(entity, (Chat, Channel)):
|
||||
elif isinstance(entity, (Chat, Channel)):
|
||||
return entity.title
|
||||
|
||||
return '(unknown)'
|
||||
return ''
|
||||
|
||||
# For some reason, .webp (stickers' format) is not registered
|
||||
add_type('image/webp', '.webp')
|
||||
|
Reference in New Issue
Block a user