Better check if msgtxt is not None.
This commit is contained in:
parent
1cbe5678da
commit
41fe6ed927
1 changed files with 8 additions and 7 deletions
|
@ -158,13 +158,14 @@ class ChatControlSession(stanza_session.EncryptedStanzaSession):
|
||||||
# We're also here if we just don't support OTR.
|
# We're also here if we just don't support OTR.
|
||||||
# Thus, we should strip the tags from plaintext
|
# Thus, we should strip the tags from plaintext
|
||||||
# messages since they look ugly.
|
# messages since they look ugly.
|
||||||
msgtxt = msgtxt.replace('\x20\x09\x20\x20\x09' \
|
if msgtxt:
|
||||||
'\x09\x09\x09\x20\x09\x20\x09\x20\x09' \
|
msgtxt = msgtxt.replace('\x20\x09\x20' \
|
||||||
'\x20\x20', '')
|
'\x20\x09\x09\x09\x09\x20\x09' \
|
||||||
msgtxt = msgtxt.replace('\x20\x09\x20\x09\x20' \
|
'\x20\x09\x20\x09\x20\x20', '')
|
||||||
'\x20\x09\x20', '')
|
msgtxt = msgtxt.replace('\x20\x09\x20' \
|
||||||
msgtxt = msgtxt.replace('\x20\x20\x09\x09\x20' \
|
'\x09\x20\x20\x09\x20', '')
|
||||||
'\x20\x09\x20', '')
|
msgtxt = msgtxt.replace('\x20\x20\x09' \
|
||||||
|
'\x09\x20\x20\x09\x20', '')
|
||||||
else:
|
else:
|
||||||
log_type = 'single_msg_recv'
|
log_type = 'single_msg_recv'
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue