summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
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()