From 9ce2aa35cafc14ec7c77e584b7404bfb49be6271 Mon Sep 17 00:00:00 2001 From: Austen Adler Date: Mon, 30 Oct 2017 10:31:23 -0400 Subject: [PATCH] Final if fix --- telematrix/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/telematrix/__init__.py b/telematrix/__init__.py index 7cee81b..9f2d1cc 100644 --- a/telematrix/__init__.py +++ b/telematrix/__init__.py @@ -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)