summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMathieu Pasquet <mathieui@mathieui.net>2014-01-29 16:41:57 +0100
committerMathieu Pasquet <mathieui@mathieui.net>2014-01-29 16:41:57 +0100
commit8a44d31e85bc997255d6514bba1f4ee4a19f2da1 (patch)
tree04111b1e4f8798e6564c6cf7d441c8f2e782d3fc /src
parent2ac24d6883214018e97838da8846ebf3a1223058 (diff)
downloadpoezio-8a44d31e85bc997255d6514bba1f4ee4a19f2da1.tar.gz
poezio-8a44d31e85bc997255d6514bba1f4ee4a19f2da1.tar.bz2
poezio-8a44d31e85bc997255d6514bba1f4ee4a19f2da1.tar.xz
poezio-8a44d31e85bc997255d6514bba1f4ee4a19f2da1.zip
Add a logging option to the OTR plugin
It is tab-specific and off by default.
Diffstat (limited to 'src')
-rw-r--r--src/tabs.py32
1 files changed, 17 insertions, 15 deletions
diff --git a/src/tabs.py b/src/tabs.py
index 95eaaae8..37cb6fdf 100644
--- a/src/tabs.py
+++ b/src/tabs.py
@@ -1975,14 +1975,6 @@ class PrivateTab(ChatTab):
except:
log.error('Unable to correct a message', exc_info=True)
- if not replaced:
- self.add_message(msg['body'],
- nickname=self.core.own_nick or self.own_nick,
- forced_user=user,
- nick_color=get_theme().COLOR_OWN_NICK,
- identifier=msg['id'],
- jid=self.core.xmpp.boundjid,
- typ=1)
if msg['body'].find('\x19') != -1:
msg.enable('html')
msg['html']['body'] = xhtml.poezio_colors_to_html(msg['body'])
@@ -1998,6 +1990,15 @@ class PrivateTab(ChatTab):
self.text_win.refresh()
self.input.refresh()
return
+ if not replaced:
+ self.add_message(msg['body'],
+ nickname=self.core.own_nick or self.own_nick,
+ forced_user=user,
+ nick_color=get_theme().COLOR_OWN_NICK,
+ identifier=msg['id'],
+ jid=self.core.xmpp.boundjid,
+ typ=1)
+
self.last_sent_message = msg
msg.send()
self.cancel_paused_delay()
@@ -3194,13 +3195,6 @@ class ConversationTab(ChatTab):
replaced = True
except:
log.error('Unable to correct a message', exc_info=True)
- if not replaced:
- self.add_message(msg['body'],
- nickname=self.core.own_nick,
- nick_color=get_theme().COLOR_OWN_NICK,
- identifier=msg['id'],
- jid=self.core.xmpp.boundjid,
- typ=1)
if msg['body'].find('\x19') != -1:
msg.enable('html')
msg['html']['body'] = xhtml.poezio_colors_to_html(msg['body'])
@@ -3216,6 +3210,14 @@ class ConversationTab(ChatTab):
self.text_win.refresh()
self.input.refresh()
return
+ if not replaced:
+ self.add_message(msg['body'],
+ nickname=self.core.own_nick,
+ nick_color=get_theme().COLOR_OWN_NICK,
+ identifier=msg['id'],
+ jid=self.core.xmpp.boundjid,
+ typ=1)
+
self.last_sent_message = msg
msg.send()
self.cancel_paused_delay()