summaryrefslogtreecommitdiff
path: root/src/tabs.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/tabs.py')
-rw-r--r--src/tabs.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/tabs.py b/src/tabs.py
index afc93a9d..7a968740 100644
--- a/src/tabs.py
+++ b/src/tabs.py
@@ -392,6 +392,9 @@ class ChatTab(Tab):
self.text_win.refresh()
self.input.refresh()
+ def get_conversation_messages(self):
+ return self._text_buffer.messages
+
def command_say(self, line):
raise NotImplementedError
@@ -719,6 +722,7 @@ class MucTab(ChatTab):
msg['xhtml_im'] = xhtml.poezio_colors_to_html(line)
if config.get('send_chat_states', 'true') == 'true' and self.remote_wants_chatstates is not False:
msg['chat_state'] = needed
+ self.core.events.trigger('muc_say', msg)
self.cancel_paused_delay()
msg.send()
self.chat_state = needed
@@ -1212,6 +1216,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', msg)
msg.send()
self.core.add_message_to_text_buffer(self._text_buffer, xhtml.convert_simple_to_full_colors(line), None, self.core.own_nick or self.own_nick)
self.cancel_paused_delay()
@@ -1875,6 +1880,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', msg)
msg.send()
self.core.add_message_to_text_buffer(self._text_buffer, xhtml.convert_simple_to_full_colors(line), None, self.core.own_nick)
logger.log_message(JID(self.get_name()).bare, self.core.own_nick, line)