Final if fix

This commit is contained in:
Austen Adler 2017-10-30 10:31:23 -04:00
parent b41badee88
commit 9ce2aa35ca

View File

@ -266,7 +266,7 @@ async def matrix_transaction(request):
.format(url.netloc, quote(url.path))
url_str = await shorten_url(url_str)
prefix = '<' + displayname + '> ' if displayname != ''
prefix = '' if displayname == '' else '<' + displayname + '> '
caption = '{}{} ({})'.format(prefix,
content['body'], url_str)
response = await group.send_photo(img_file, caption=caption)