Force LTR for admin list

log_* files have force_ltr and admins.py has FORCE_LTR, amazing
This commit is contained in:
blank X 2021-04-04 15:43:28 +07:00
parent afe1c2e1ea
commit 5d9a11f591
Signed by: blankie
GPG Key ID: CC15FC822C7F61F5
1 changed files with 2 additions and 1 deletions

View File

@ -3,11 +3,12 @@ from pyrogram import Client, filters
from .. import config, help_dict, log_errors, public_log_errors, get_entity
ZWS = '\u200B'
FORCE_LTR = '\u200E'
def _generate_sexy(entity, ping, is_creator):
text = entity.first_name
if entity.last_name:
text += f' {entity.last_name}'
sexy_text = '<code>[DELETED]</code>' if entity.is_deleted else html.escape(text or 'Empty???')
sexy_text = '<code>[DELETED]</code>' if entity.is_deleted else (html.escape(text or 'Empty???') + FORCE_LTR)
if not entity.is_deleted:
if ping:
sexy_text = f'<a href="tg://user?id={entity.id}">{sexy_text}</a>'