summaryrefslogtreecommitdiff
path: root/src/tabs.py
diff options
context:
space:
mode:
authorFlorent Le Coz <louiz@louiz.org>2011-11-12 03:42:07 +0100
committerFlorent Le Coz <louiz@louiz.org>2011-11-12 03:42:07 +0100
commit744af2459d7d3a3c7a7e9d1f3861d4d494a837ba (patch)
tree8e53ce2207498070f83ea325065b687051e434ed /src/tabs.py
parent6b9d166e1cfe6c71a1f55d86e144a17fc3e73581 (diff)
downloadpoezio-744af2459d7d3a3c7a7e9d1f3861d4d494a837ba.tar.gz
poezio-744af2459d7d3a3c7a7e9d1f3861d4d494a837ba.tar.bz2
poezio-744af2459d7d3a3c7a7e9d1f3861d4d494a837ba.tar.xz
poezio-744af2459d7d3a3c7a7e9d1f3861d4d494a837ba.zip
Add three new events to modify a message JUST before we send it. It is NOT safe, and the doc says that pretty clearly. It is used to encrypt messages just before sending them (this way we can remove ALL potential in-clear bodies).
Diffstat (limited to 'src/tabs.py')
-rw-r--r--src/tabs.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/tabs.py b/src/tabs.py
index 02678e7e..d7f1323b 100644
--- a/src/tabs.py
+++ b/src/tabs.py
@@ -771,6 +771,7 @@ class MucTab(ChatTab):
if config.get('send_chat_states', 'true') == 'true' and self.remote_wants_chatstates is not False:
msg['chat_state'] = needed
self.cancel_paused_delay()
+ self.core.events.trigger('muc_say_after', msg, self)
msg.send()
self.chat_state = needed
@@ -1268,6 +1269,7 @@ class PrivateTab(ChatTab):
if config.get('send_chat_states', 'true') == 'true' and self.remote_wants_chatstates is not False:
needed = 'inactive' if self.core.status.show in ('xa', 'away') else 'active'
msg['chat_state'] = needed
+ self.core.events.trigger('private_say_after', msg, self)
msg.send()
self.cancel_paused_delay()
self.text_win.refresh()
@@ -1958,6 +1960,7 @@ class ConversationTab(ChatTab):
if config.get('send_chat_states', 'true') == 'true' and self.remote_wants_chatstates is not False:
needed = 'inactive' if self.core.status.show in ('xa', 'away') else 'active'
msg['chat_state'] = needed
+ self.core.events.trigger('conversation_say_after', msg, self)
msg.send()
logger.log_message(JID(self.get_name()).bare, self.core.own_nick, line)
self.cancel_paused_delay()