Use HTML in who

master
Lonami 2019-05-20 09:53:16 +02:00
parent fe6b878064
commit 1dd6e63d6a
1 changed files with 4 additions and 3 deletions

View File

@ -14,6 +14,7 @@ async def _(event):
else:
msg = await event.message.get_reply_message()
if msg.forward:
# FIXME forward privacy memes
who = await borg.get_entity(
msg.forward.from_id or msg.forward.channel_id)
else:
@ -21,7 +22,7 @@ async def _(event):
who_string = utils.get_display_name(who)
if isinstance(who, (types.User, types.Channel)) and who.username:
who_string += f" (@{who.username})"
who_string += f", [#{who.id}](tg://user?id={who.id})"
who_string += f" <i>(@{who.username})</i>"
who_string += f", <a href='tg://user?id={who.id}'>#{who.id}</a>"
await event.edit(who_string)
await event.edit(who_string, parse_mode='html')