This commit is contained in:
Hafitz Setya 2021-02-14 20:57:56 +07:00 committed by GitHub
parent 35e636cc23
commit c7b58b09cd
Signed by untrusted user: GitHub
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -141,8 +141,12 @@ class MirrorListener(listeners.MirrorListeners):
if os.path.isdir(f'{DOWNLOAD_DIR}/{self.uid}/{download_dict[self.uid].name()}'):
share_url += '/'
msg += f'\n\n Shareable link: <a href="{share_url}">here</a>'
if self.tag is not None:
msg += f'\ncc: @{self.tag}'
if self.message.from_user.username:
uname = f"@{self.message.from_user.username}"
else:
uname = f'<a href="tg://user?id={self.message.from_user.id}">{self.message.from_user.first_name}</a>'
if uname is not None:
msg += f'\n\ncc : {uname}'
try:
fs_utils.clean_download(download_dict[self.uid].path())
except FileNotFoundError: