diff --git a/telematrix/__init__.py b/telematrix/__init__.py index c0f6a50..1a567d7 100644 --- a/telematrix/__init__.py +++ b/telematrix/__init__.py @@ -239,15 +239,15 @@ async def matrix_transaction(request): continue if content['msgtype'] == 'm.text': - prefix = '<' + displayname + '> ' if displayname != '' + prefix = '' if displayname == '' else '<' + displayname + '> ' msg, mode = format_matrix_msg('{}{}', prefix, content) response = await group.send_text(msg, parse_mode=mode) elif content['msgtype'] == 'm.notice': - prefix = '[' + displayname + '] ' if displayname != '' + prefix = '' if displayname == '' else '[' + displayname + '] ' msg, mode = format_matrix_msg('{}{}', prefix, content) response = await group.send_text(msg, parse_mode=mode) elif content['msgtype'] == 'm.emote': - prefix = '* ' + displayname + ' ' if displayname != '' + prefix = '' if displayname == '' else '* ' + displayname + ' ' msg, mode = format_matrix_msg('{}{}', prefix, content) response = await group.send_text(msg, parse_mode=mode) elif content['msgtype'] == 'm.image':