Skip to content
Snippets Groups Projects
Commit 0346e29e authored by js's avatar js
Browse files

*sigh* I'm too confused today. This is nicer.

parent 03f64fb2
No related branches found
No related tags found
No related merge requests found
......@@ -152,21 +152,20 @@ class ChatControlSession(stanza_session.EncryptedStanzaSession):
if msgtxt == '':
return
else:
if msgtxt:
self.append_otr_tag = False
# We're also here if we just don't
# support OTR. Thus, we should strip
# the tags from plaintext messages
# since they look ugly.
msgtxt = msgtxt.replace('\x20\x09\x20' \
'\x20\x09\x09\x09\x09\x20\x09' \
'\x20\x09\x20\x09\x20\x20', '')
msgtxt = msgtxt.replace('\x20\x09\x20' \
'\x09\x20\x20\x09\x20', '')
msgtxt = msgtxt.replace('\x20\x20\x09' \
'\x09\x20\x20\x09\x20', '')
elif msgtxt != None and msgtxt != '':
self.append_otr_tag = False
# We're also here if we just don't
# support OTR. Thus, we should strip
# the tags from plaintext messages
# since they look ugly.
msgtxt = msgtxt.replace('\x20\x09\x20' \
'\x20\x09\x09\x09\x09\x20\x09' \
'\x20\x09\x20\x09\x20\x20', '')
msgtxt = msgtxt.replace('\x20\x09\x20' \
'\x09\x20\x20\x09\x20', '')
msgtxt = msgtxt.replace('\x20\x20\x09' \
'\x09\x20\x20\x09\x20', '')
else:
log_type = 'single_msg_recv'
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment