Correct bot-owner if statements

This commit is contained in:
Austen Adler 2017-10-30 10:27:17 -04:00
parent e20654668b
commit b41badee88

View File

@ -237,15 +237,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':