Gogs 2 rokov pred
rodič
commit
2597a8f11c
1 zmenil súbory, kde vykonal 3 pridanie a 3 odobranie
  1. 3 3
      commands.py

+ 3 - 3
commands.py

@@ -163,8 +163,8 @@ async def make_message_shot(bot, message):
     full_name = full_name.title
   else:
     sender_id = message.sender.id
- 
-    full_name = get_display_name(sender_id)
+
+    full_name = get_display_name(message.sender)
 
   output_path = make_temporary_filename('png')
   avatar_path = await make_cache_filename(sender_id, 'png')
@@ -185,7 +185,7 @@ async def make_message_shot(bot, message):
   data += pack('I', len(avatar_path))
   data += bytes(avatar_path, encoding='ASCII')
 
-  username = bytes(full_name if full_name else message.sender.username, encoding='UTF-8')
+  username = bytes(full_name, encoding='UTF-8')
   data += pack('I', len(username))
   data += username