Skip to content

Commit

Permalink
get user name in all cases
Browse files Browse the repository at this point in the history
Signed-off-by: viste <[email protected]>
  • Loading branch information
Viste committed Sep 18, 2024
1 parent da9d25c commit ef729d5
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion core/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,10 @@ async def work_send_demo(message: types.Message):
else:
logging.info('info about message %s', message)
logging.info('id of file %s', message.video.file_id)
sender_name = message.chat.first_name
if message.chat.first_name is None:
sender_name = message.chat.username
else:
sender_name = message.chat.first_name
if message.chat.last_name is None:
sender_lastname = ' '
else:
Expand Down

0 comments on commit ef729d5

Please sign in to comment.